Redirect Domain to Subfolder On Server

For the Htaccess file: (replace ‘live’ with subfolder name):

Options -Indexes
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^$ live/index.php [L]
RewriteCond %{DOCUMENT_ROOT}/live%{REQUEST_URI} -f
RewriteRule .* live/$0 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* live/index.php?q=$0 [L,QSA]
If using Drupal, change the settings.php file:
uncomment $base_url and add the URL domain

Leave a Reply

Your email address will not be published. Required fields are marked *