.htaccess question

menaice

Regular Member
Joined
Apr 23, 2009
Messages
207
Reaction score
121
I didn't know where to put this, but i did alot of searching and can't find a real answer to rewrite.


I would like to know how to setup .htaccess so that my main site's base folder is in a subfolder of public_html.

In other words:

/home/myaccount/public_html/subfolder1 (for my main domain)
/home/myaccount/public_html/subfolder2 (for my first addon domain)
/home/myaccount/public_html/subfolder3 (for my second addon domain)but when I access my main domain from a browser, I do not want it to show that I am redirecting:

I want to see:
http://www.mymaindomain.com/
and not http://www.mymaindomain.com/subfolder1

Also, will doing this affect any SEO
 
Last edited:
I figured it out... so this can be deleted if needed or left up if someone else has the same question here is the rewrite code to make this possible

RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?domainname\.net$ [nc]
RewriteRule ^(.*)$ /domainnamefolder/$1 [L]
 
Thanks for posting your solution I wanted to know this as well.
 
Back
Top