Redirect Folder Files To Root Domain

If you want to redirect all folders and files within the folder to root domain then you can do it with htaccess file.



Copy the simple code given below and change the folder name which you want to redirect and domain name and paste it in your .htaccess file which is located at root domain.

RewriteEngine On
RewriteRule ^foldername/* http://www.domain.com/ [R=301,L]

That's it now save the file and see the changes. you can leave a comment if you have any doubt.





No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...

ShareThis