views:

191

answers:

2

I am trying to set-up my localhost development server. I have everything working but when I try to add an .htaccess it throws this error:

Internal Server Error

The server encountered an internal error or misconfiguration and 
was unable to complete your request.

Please contact the server administrator, [no address given] 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.

I dont know exactly why this is, this is pretty much the exact same setup as the other developers machine, but when using my .htaccess file I get that error.

Here is my .htaccess file (NOTE: They are commented because I left my site with this setup. It only lets me view the index page. Without this .htaccess file, I can navigate.):

This is the only thing in my .htaccess file right now, and it breaks.

RewriteEngine On

A: 

This part looks funny:

ErrorDocument 404 /404

It should be something like:

ErrorDocument 404 /path/to/404error.htm

or something like that. If it redirects to /404 and that directory doesn't exist you'll have an endless loop.

Other than that we may need some more information. There is likely something in your error log that will tell you more about what's going on with it.

Jeremy Morgan
The issue is not the 404 error. I meant that all of this is commented out. If i leave RewriteEngine On and add nothing else to the .htaccess file it still gives my to 500 Internal Server Error? Any advice.
Chris
Nevermind now. I solved it. I did run >sudo a2enmod rewrite On the server. It works now. Thanks -Chris-
Chris
A: 

Use …

Options +FollowSymLinks

… before RewriteEngine On. And check your vhost config for:

AllowOverride All

You may get more info from the error log, which is usually in apache/logs/error.log.

toscho