Forum Moderators: phranque
First, I would like to thank the many people that have posted info and links about mod_rewrite in these forums. I have spent numberous hours already looking through the forums.
Due to the great info, I was able to write this code:
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^/$ /catalog/
RewriteRule ^index.htm /catalog/
It works great on two of my domains. It redirects the docroot to the catalog directory just fine as in:
www.mydomain.com shows the www.mydomain.com/catalog/default.php page.
My problem is with the third domain. When I use www.mythirddomain.com I get the index of the directory because there isn't an index.htm in the docroot.
The catalog directory is identical to the other two domains and the domains are all virtual hosts on the same server. If I use www.mythirddomain.com/index.htm, it redirects to the catalog directory correctly.
Does anyone have any ideas where or what I can check from here? If someone needs to see the directory listing (maybe a file is causing the problem), stickymail me for the url.
Lastly, any help will be appreciated.
It still allows specific doc requests through, too.
i.e. www.mydomain.com/tools.htm shows the tools.htm from the docroot.
Thanks a Million! I can see that I have found a goldmine here.
Dave
Welcome to WebmasterWorld [webmasterworld.com]!
Also, you could add
Options -Indexes
DirectoryIndex default.php
Jim
I will add the DirectoryIndex default.php to the catalog directory.
It's good to be here. I have been looking for a resource like this for a long time. I just needed the right search phrase to bring me here.