smac1979
5-11-04, 02:37 PM
I originally had this post in the Domain names & DNS portion of the forum but I think it'd do better here. I have 2 domains, one is of course pointing to my htdocs folder, the second; a sub folder. when I enter the url www.domain1.com I get the index.html in my htdocs folder. When I enter the the url www.domain2.com I get the index.html in my sub folder. So everything works well. Until I enter the url www.domain2.com/index.html, it then redirects to my domain1 index.html in the htdocs folder. I think this has to do with the way my .htaccess is setup, as of now, I have it so that when I go to my first domain www.domain1.com it automatically redirects to a directory. Could the problem be in the vague redirection line that says 'Redirect /index.html'? Thanks for any help.
RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteCond %{HTTP_HOST} domain2.com
RewriteCond %{REQUEST_URI} !subfolder/
RewriteRule ^(.*)$ subfolder/$1 [L]
Redirect /index.html http://domain1.com/data/
RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteCond %{HTTP_HOST} domain2.com
RewriteCond %{REQUEST_URI} !subfolder/
RewriteRule ^(.*)$ subfolder/$1 [L]
Redirect /index.html http://domain1.com/data/