eJM
enterpriseJM
Like many, I have a several domains in my VPS account. The main domain the host account was set up with is enterprisejm.net, which is in the html_public root, and the rest of my domains are set up in folders in html_public. The directory structure would look like this (click to enlarge):
My mod rewrite routine doesn't seem to work properly. I do have the redirect to non-www status for enterprisejm.net, but when it comes to redirecting, for instance, enterprisejm.net/1foot to 1footinthegrave.com, it either doesn't work at all, or it redirects to the 1foot domain, but to a 404 error page instead of the home page.
I have this redirect in the .htaccess file that was automatically put there by the cPanel redirect feature:
When I type enterprisejm.net/1foot in the browser's address bar, I get 1footinthegrave.com//home/ejm/public_html/1foot, which results in a 404 page at 1foot.
When I type 1foot.enterprisejm.net in the address bar, I get the 1foot home page, just as it is s'posed to do.
However, I haven't developed the site shopbycatalog.net yet, so when I type in enterprisejm.net/shopbycatalog, I get the directory listing of that folder, which includes only a link to the parent directory and the folder cgi-bin. When I type in shopbycatelog.enterprisejm.net, I get shopbycatalog.net and a directory list without the link to the parent directory (as it should be, I think).
What I want is when someone (or a search spider) follows a link that refers to any subdirectory on enterprisejm.net that belongs to another domain, I want it to be directed to that domain's home page.
I hope I haven't confused anyone. To summarize:
folder1.enterprisejm.net should redirect to folder1.com
enterprisejm.net/folder1 should redirect to folder1.com
As a side note, I have some domains set up for [noparse]www.domain.com[/noparse] and some as just domain.com. I have the rewrite in each of the domain folders to redirect from one to the other, but I don't know if that is necessary to set up in the enterprisejm.net .htaccess file too.
Thanks for any help with this.
Jim
My mod rewrite routine doesn't seem to work properly. I do have the redirect to non-www status for enterprisejm.net, but when it comes to redirecting, for instance, enterprisejm.net/1foot to 1footinthegrave.com, it either doesn't work at all, or it redirects to the 1foot domain, but to a 404 error page instead of the home page.
I have this redirect in the .htaccess file that was automatically put there by the cPanel redirect feature:
Code:
RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^1foot/?$ "http\:\/\/1footinthegrave\.com" [R=301,L]
When I type 1foot.enterprisejm.net in the address bar, I get the 1foot home page, just as it is s'posed to do.
However, I haven't developed the site shopbycatalog.net yet, so when I type in enterprisejm.net/shopbycatalog, I get the directory listing of that folder, which includes only a link to the parent directory and the folder cgi-bin. When I type in shopbycatelog.enterprisejm.net, I get shopbycatalog.net and a directory list without the link to the parent directory (as it should be, I think).
What I want is when someone (or a search spider) follows a link that refers to any subdirectory on enterprisejm.net that belongs to another domain, I want it to be directed to that domain's home page.
I hope I haven't confused anyone. To summarize:
folder1.enterprisejm.net should redirect to folder1.com
enterprisejm.net/folder1 should redirect to folder1.com
As a side note, I have some domains set up for [noparse]www.domain.com[/noparse] and some as just domain.com. I have the rewrite in each of the domain folders to redirect from one to the other, but I don't know if that is necessary to set up in the enterprisejm.net .htaccess file too.
Thanks for any help with this.
Jim