Welcome to WebmasterWorld Guest from 107.22.56.104

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

.htaccess on a Apache/1.3.27 Server

500 Internal Server Error

     
1:02 pm on Feb 4, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:June 12, 2003
posts:164
votes: 0


Hi all,

I've uploaded a .htaccess to redirect browser errors to the right error pages, but all I get now is '500 Internal Server Error'

Is there a place where I can verify the file and debug it?

ATM i have in the .htaccess the following

-----------------------------
ErrorDocument 404 [somedomainurl.com...]
ErrorDocument 403 [somedomainurl.com...]

-----------------------------
There is more errors inserted intot he file but the list is too long to post here.

Any ideas why the .htaccess file would cause the 500 error?

Many thx

1:21 pm on Feb 4, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Aug 8, 2001
posts:926
votes: 0


Try

===
ErrorDocument 404 /errors/404.htm
ErrorDocument 403 /errors/403.htm
===

As far as I know the error document has to be local.

1:53 pm on Feb 4, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:June 12, 2003
posts:164
votes: 0


yep i got the pages local to the domain.

I'll try remving the full url.

thx

<added>
Nope that remedy didn't work unfortunatelly. I still get '500 Internal Server Error'
</added>

2:00 pm on Feb 4, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Aug 8, 2001
posts:926
votes: 0


[httpd.apache.org...]

Only has to be local for 401 documents.

My best suggestion is to add one line at a time - find which one gives you the 500 and look more closely at it - post here if it's not obvious. Good luck.

2:10 pm on Feb 4, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:June 12, 2003
posts:164
votes: 0


gethan,

I did what you suggested.

For obvious reason I started with the 404 error as we know this occurs if the page/link does not exist on the site.

so the .htaccess has the following:

ErrorDocument 404 /errors/404.htm

With this 1 line there still an 500 internal error issue.

hmmmm

2:18 pm on Feb 4, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Aug 8, 2001
posts:926
votes: 0


It looks good. Ok -

The files exists?

And try using a message.

ErrorDocument 404 "Test Error Message"

Finally - does your host have some built in redirects on file not found? Mine does - which I hate but I'll live with. Could be interfering with each others rules.

2:19 pm on Feb 4, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:June 12, 2003
posts:164
votes: 0


It just doesn't like the .htaccess file at all.

Every time it finds a .htaccess file it returns a 500 error, but I could be barking up the wrong tree here.

Don't suppose appache got a setting that needs to enable .htaccess to be parsed?

2:40 pm on Feb 4, 2004 (gmt 0)

Administrator

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 31, 2003
posts:12547
votes: 2


Yes. Allowoverride [httpd.apache.org]

h**p://httpd.apache.org/docs/misc/FAQ.html#htaccess-work

[edited by: coopster at 2:42 pm (utc) on Feb. 4, 2004]

2:41 pm on Feb 4, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Aug 8, 2001
posts:926
votes: 0


[httpd.apache.org...]

Yes - but it says that if it is not set then the .htaccess file is completely ignored... which would not explain your 500.

Meaning remove .htaccess and start debugging again :)

4:55 pm on Feb 4, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


> Only has to be local for 401 documents.

A "fine" point here, but an important one. You must use a local path if you wish the server to return the specified error code to the client. If you use an external redirect (by specifying a canonical URL), then the server will return a 302-Found status to the client, thus hiding the problem from the client. This can be a huge disaster if the client is a search engine spider. If you care about search engine rankings and listings, don't specify an external URL!

Jim

3:55 pm on Feb 6, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:June 12, 2003
posts:164
votes: 0


well thats thrown a spanner in the works...am totally confucus now =]

I just don't see what AllowOverride has to do with my situation.

5:29 pm on Feb 6, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


spud01,

AllowOverride [httpd.apache.org] must be set to "All" or at least to "FileInfo" to allow you to use any directives which modify the URL. It is a server configuration setting, and many hosting companies don't trust you to do redirects correctly, so they leave it off to save on support costs. Ask first, then change hosts if no help is offered.

Jim

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members