.htaccess problem

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
vchris
Forum Contributor
Posts: 204
Joined: Tue Aug 30, 2005 7:53 pm
Location: Canada, Quebec

.htaccess problem

Post by vchris »

One of my friend is having a problem with his server. When trying to view any page I get the following error:
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@xxxxxxx.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
Error log message: [Fri Jun 15 09:34:53 2007] [alert] [client xxxxxxxxx] /xxxxxxxxx/.htaccess: IndexIgnore not allowed here

Content of .htaccess:

Code: Select all

# -FrontPage-

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName www.xxxxxxxxx.com
AuthUserFile xxxxxxxx/service.pwd
AuthGroupFile xxxxxxxx/service.grp
Any idea what it could be? Is this .htaccess file ok?


I played a bit with it and found out that if I remove these lines it works:

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>

If I remove the limits or the IndexIgnore it doesn't work. I absolutely have to remove both. know why?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Re: .htaccess problem

Post by volka »

vchris wrote:Content of .htaccess:
All of it?
vchris
Forum Contributor
Posts: 204
Joined: Tue Aug 30, 2005 7:53 pm
Location: Canada, Quebec

Re: .htaccess problem

Post by vchris »

volka wrote:
vchris wrote:Content of .htaccess:
All of it?
Yes sir!
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

If you check your error log, it'll tel you that the regex can't be compiled.

Regex for .htaccess is slightly different that regular regex. And what's with the double questions marks?
vchris
Forum Contributor
Posts: 204
Joined: Tue Aug 30, 2005 7:53 pm
Location: Canada, Quebec

Re: .htaccess problem

Post by vchris »

superdezign wrote:If you check your error log, it'll tel you that the regex can't be compiled.

Regex for .htaccess is slightly different that regular regex. And what's with the double questions marks?
vchris wrote:Error log message: [Fri Jun 15 09:34:53 2007] [alert] [client xxxxxxxxx] /xxxxxxxxx/.htaccess: IndexIgnore not allowed here
That's all I got in the error log. A bunch of these.
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

Then the problem is the fact that you are trying to use IndexIgnore in your .htaccess file. It doesn't even get to the (strange) regex.

Maybe you should Google the correct usage.
vchris
Forum Contributor
Posts: 204
Joined: Tue Aug 30, 2005 7:53 pm
Location: Canada, Quebec

Post by vchris »

But even if I remove IndexIgnore it still won't work. I have to remove both the IndexIgnore and the Limits.
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

Then that means that the server you are hosted on has disabled the ability to alter those settings through .htaccess. Have you tried contacting them in regards to it?
vchris
Forum Contributor
Posts: 204
Joined: Tue Aug 30, 2005 7:53 pm
Location: Canada, Quebec

Post by vchris »

I'm not the admin but that would make sense. Since one day I logged on the site and I had the error mentioned in the first post and I doubt .htaccess was modified. What would I need to ask the admin for? What setting does he need to change?
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

Probably the "AllowOverride" settings of the Apache httpd.conf file. I think that if an AllowOverride setting is NOT set for certain options, it's not allowed to be overwritten in an .htaccess file.
vchris
Forum Contributor
Posts: 204
Joined: Tue Aug 30, 2005 7:53 pm
Location: Canada, Quebec

Post by vchris »

Thanks I'll contact the admin!
Post Reply