I have a GoDaddy account with a directory structure something like this...
/root <--- mymaindomainname.com points here
/root/other <--- a sub-directory
/root/blog <--- myblogdomainname.com points here
/root/blog/wp <--- wordpress installed in this sub-directory
So, to access my blog, a user enters
"http://myblogdomainname.com/wp/".
I am trying to use mod_rewrite to make it so a user only has to enter "http://myblogdomainname.com/". I found several postings on the web which suggest that I create a .htaccess file with the following:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?myblogdomainname.com$
RewriteRule ^(/)?$ wp [L]
I have placed this .htaccess in /root/blog. But when I try to access my blog using "http://myblogdomainname.com/" I get a 404. All I can figure out is that I think the problem has something to do with the fact that myblogdomainname.com is pointing at a sub-directory in my GoDaddy account, and not the root folder.
When, as a test, I added a .htaccess to my /root folder as follows...
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?mymaindomainname.com$
RewriteRule ^(/)?$ other [L]
... the rewrite worked fine.
Is there anything obvious that I am missing here?