Knowledgebase: cPanel
How to redirect from main site to subfolder
Posted by Susan Tyson on 08 June 2016 06:05 PM

If you are trying to redirect from to this requires a special .htaccess config to avoid creating a loop. You can use the following in the .htaccess of the main site. Replace with your own website, and replace newfolder with the name of the folder you want to redirect to.

RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?$
RewriteCond %{REQUEST_URI} !^/newfolder/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /newfolder/$1
RewriteCond %{HTTP_HOST} ^(www.)?$
RewriteRule ^(/)?$ newfolder/index.php [L]
(0 vote(s))
Not helpful

Comments (5)
13 July 2016 07:54 PM
I have really noticed that credit score improvement activity must be conducted with tactics. If not, it’s possible you’ll find yourself destroying your rating. In order to succeed in fixing your credit ranking you have to confirm that from this second you pay your entire monthly dues promptly prior to their booked date. It is significant because by not acshmplicoing so, all other actions that you will decide to try to improve your credit positioning will not be efficient. Thanks for sharing your strategies.
14 July 2016 04:59 PM
It's really great that people are sharing this <a href="">innfimatroo.</a>
17 July 2016 01:39 PM
Free knowledge like this doesn't just help, it promote deoamrccy. Thank you. [url=]mhfhbbonrpr[/url] [link=]ojtylsxkry[/link]
18 July 2016 08:23 PM
I don't even know what to say, this made things so much <a href="">easrei!</a>
19 July 2016 02:06 AM
Please keep thrwiong these posts up they help tons. [url=]kfkkzq[/url] [link=]zizgwowoi[/link]
Post a new comment
Full Name:
CAPTCHA Verification 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).