Hey,
I've been looking for solutions for days and nothing so far. This is my last hope!
Ok so I have a subdomain @ sub.domain.com where the DocumentRoot is domain.com/sub/ (it's not actually that in the conf, im just making it easy for the example).
I have a bunch of htaccess rewrite rules just to make my URLs nice, like domain.com/contact-us is domain.com/contact_us.php. Done it many times, it's always worked no problem, and currently does work on domain.com.
The problem is domain.com/sub/ (aka, sub.domain.com) isn't allowing htaccess rules. If I enter them directly into my <Directory> directive for the sub directory it works! I need to enable htaccess in the sub directory though, because I don't want to keep updating httpd.conf with this stuff and have to restart the server each time.
AllowOverride All is set in the root directory and my sub directory / sub domain.
AccessFile .htaccess exists above this all.
Here is my VirtualHost for the sub domain:
<VirtualHost MY_IP>
ServerName sub.domain.com
DocumentRoot /home/domain/public_html/sub/
<Directory /home/domain/public_html/sub>
AllowOverride All
</Directory>
I also have this to prevent wildcard subdomains (It's below the above VirtualHost, so shouldn't conflict with it right?)
<VirtualHost MY_IP>
ServerName fail.domain.com
ServerAlias *.domain.com
DocumentRoot /home/domain/public_html/fail/
Redirect 301 / http://domain.com/
</VirtualHost>
My main domain.com VirtualHost has the below (which is above everything else)
<Directory /home/domain/public_html>
Options -Indexes +IncludesNOEXEC +FollowSymLinks +ExecCGI
allow from all
AllowOverride All
... more directives here
See anything wrong? It's all working great except for that 1 sub domain's htaccess, if I enter the .php extension it displays the correct file, just won't enable htaccess for that dir.
Any help would be great.
Thanks.