Forum Moderators: phranque

Message Too Old, No Replies

htaccess not affecting subdirectories at all

         

danielpataki

4:55 pm on Apr 1, 2011 (gmt 0)

10+ Year Member



Hi everyone!

This is my first forum post here, please excuse any stupidity on m part :) I've had a problem bugging me for ages, and I have no idea what is going on.

Whenever I develop something on an online web server my htaccess files and php.ini files work as expected. If I place a php.ini into a directory and then call phpinfo(), I can see that it is parsed.

However, when I use a locally installed web server working directory php.ini files are never parsed, and for some reason my htaccess file only affects the directory it is in, not its subdirectories.

I have made sure that AllowOverride is set to All, and indeed if I auto_prepend a file using htaccess it is prepended to all files in the root directory. If I go to a subdirectory however, it is not.

Also, not matter what I try, php.ini is not parsed from current working directories. I suspect this might have something to do with cgi, btu I have no experience in the area.

I am pretty sure this is a setup issue as I don't have this problem on any online servers I've encountered, but I have the same problem with MAMP and XAMPP for max and XAMPP on Windows as well.

Ultimately my goal is to be able to auto_prepend a file in the root directory and have that auto prepend rule work in all subdirectories as well. On the web server I could do this in the master php.ini, but I develop on my local MAMP installation and I need separate php.ini (or htaccess) files for the different projects.

I greatly appreciate your help,

jdMorgan

2:21 am on Apr 6, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



See mod_rewrite "RewriteOptions inherit".

This should be declared in your (local) server config file, or in all .htaccess files below root.

Jim

danielpataki

8:25 am on Apr 6, 2011 (gmt 0)

10+ Year Member



Hi Jim!

Thanks for your help, but this is not the solution I think. It's not just mod_rewrite which is not working.

Local php.ini files are not parsed at all, and .htaccess rules do not propogate to subfolders, not just mod_rewrite, but things like auto_prepend and such.