Forum Moderators: phranque
I've encountered some problems with using .htaccess files under my virtual domain www.example.com
This domain is located at the server with the server name servername-b.org.
I have my own home directory on this server namely /home/paranoya/ in this directory I have my public_html directory in which my old website was located and I have my example_html directory in which the web site www.example.com is located.
Now the problem is that apache does not use any .htaccess file I have located in the example_html directory. But when I place a .htaccess file under the public_html it will do its job correctly.
Well after a brief search on the internet I found out I had to allow the usage of .htaccess files for my example_html directory.
after having a look at my httpd.conf I saw that it was set up like this for all the public html directories:
<Directory /home/*/public_html>
AllowOverride FileInfo AuthConfig Limit Options Indexes
Options MultiViews -Indexes SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS PROPFIND>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>
So I figured this would probably the same for my example_html directory, therefore I added the following:
<Directory /home/paranoya/example_html>
AllowOverride FileInfo AuthConfig Limit Options Indexes
Options MultiViews -Indexes SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS PROPFIND>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>
Well guess what this didn't help a bit I still couldn't make use of any of my .htaccess files located under example_html directory.
So after trying some more I also found out some other weird thing. I have placed a .htaccess file in one of the underlying directories of the public_html directory. This one denies a directorylisting of that dir. This works nicely when I browse to that directory using the following URL: [servername-b.org ]
BUT my public_html directory is also linked to the my paranoya.example.com domain. So when I browsed to the same location, through my www.example.com domain, using this URL: [paranoya.example.com ]
The .htaccess file is ignored again as you can see.
So it seems that apache ignores all .htaccess files "under" my example.com domain. I've searched for hours to find a solution and I just have the feeling that it is something very elementary I'm missing here. :)
Can someone please help me out?
[edited by: jdMorgan at 7:04 pm (utc) on May 18, 2004]
[edit reason] Removed specifics per WebmasterWorld TOS [/edit]
Welcome to WebmasterWorld [webmasterworld.com]!
Quick question... Did you restart Apache after editing httpd.conf?
Jim