I dug high and low around Google and StackOverflow to try to figure out my problem by trying countless solutions, but nothing worked.
I am looking to move the network root of the primary domain on my server to a subdirectory. What I currently have for the server path to my web root:
/home/user/public_html/MyWebFilesHere
What I want to have:
/home/user/public_html/subdir/MyWebfilesHere
When I browse mydomain.com, there should be no apparent difference (ie "subdir" does not appear after the redirect).
Unfortunately, I will confine myself to this exclusively with the .htaccess file, since I am on a shared hosting and do not have access to the Apache configuration files and the like. :(
In my .htaccess in public_html, I have:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?mydomain\.com$
RewriteCond %{REQUEST_URI} !^/subdir/
RewriteRule ^(.*)$ /subdir/$1 [L]
, .
mydomain.com/Contact/
, /subdir/Contact/, .
mydomain.com/Contact
( '/'), , ,
mydomain.com/subdir/Contact/
, , "subdir".
colincwilliams.com/Contact/
colincwilliams.com/Contact
- , , ?