Apache – ModRewrite – redirect site to a subfolder

If you want to redirect your website to a subfolder you can edit (or create) the root file .htaccess using Apache ModRewrite

You can insert the following code:

This method is useful also to create different installation (and version) of your website in different folders. You can edit then .htaccess file to redirect to one or another installation.

Facebooktwitterredditpinterestlinkedinmail