TECHIES WORLD

For Techs.... Techniques.... Technologies....

ApacheCpanelLinux

How to redirect all requests to sub-folder to another domain using .htaccess

To redirectall requests to a subfolder to another domain, we need to save the following lines to the .htaccess file.

RewriteEngine On
RewriteBase /subfolder/
RewriteRule ^(.*)$ http://domain/$1 [R=301,L]

Here we need to replace subfolder, domain with the required values.

Leave a Reply