PDA

View Full Version : .htaccess trouble



foeggy
02-11-2004, 11:28 AM
I thought I'd post this APACHE problem here becuase I'm trying to parse html with php :wink: .

A few directories deep, I have a .htaccess file that checks for correct authentication and it works fine. However, in a higher directory I created another .htaccess file that would cause the .html files to be parsed by php. This new .htaccess file gives me a 500 Internal Server Error. I tried putting different commands in this new .htaccess file and none of them work. The only way I can load pages affected by this .htaccess file is for the file to be empty.

Does anyone have a clue as to what is going on? Thanks.

Geoff

FZ
02-11-2004, 01:45 PM
Could you post the contents of your .htaccess(es)? Impossible to say what is wrong without having a look...

foeggy
02-11-2004, 02:11 PM
Original for authentication:
AuthUserFile /home/domain/www/dir/members/.htpasswd
AuthType Basic
AuthName "Title"

<Limit GET>
require valid-user
</Limit>



New one, that nothing works in:
IndexIgnore *

FZ
02-11-2004, 03:07 PM
Weird - nothing wrong with either of those two. What about the code you are using to parse .html files through PHP? Did you make any changes to httpd.conf?

foeggy
02-11-2004, 04:53 PM
The error in the log file is:
[alert] [client ip] /var/www/html/dir/.htaccess: IndexIgnore not allowed here

Not sure what's goin on! I reloaded an unchanged version of httpd.conf

FZ
02-11-2004, 05:54 PM
Sorry, I have no clue either... I tried out both of your above .htaccess files, and they both worked (in the sense that neither produced any errors, such as the one above). Maybe you can work around having to use IndexIgnore - what is it you are trying to do?

jalal
02-12-2004, 01:51 AM
You need to check whether your httpd.conf file allows overrides of directory permissions. Look for lines containing 'AllowOverride All' or 'AllowOverride None'. Mine is setup with All on the html directories, 'None' on the icon directory and 'AuthConfig' on the cgi-bins. Which I think is a standard sort of setup.