Client Portal

How to change my document root folder using an .htaccess file? Print

  • 1

Open your .htaccess and add the following:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^$ [NC,OR]
RewriteCond %{HTTP_HOST} ^$
RewriteCond %{REQUEST_URI} !folder/
RewriteRule (.*) /folder/$1 [L]

In the above lines you should replace the following: - Type your own domain name
folder - Type the name of the subfolder which has the test/development website

Was this answer helpful?

« Back