.htaccess file on localhost throwing an error when using a Virtual Host config on my Localhost!!

Posted by Chris on Stack Overflow See other posts from Stack Overflow or by Chris
Published on 2010-03-31T16:27:06Z Indexed on 2010/03/31 16:33 UTC
Read the original article Hit count: 175

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.):

Options -indexes
RewriteEngine On

ErrorDocument 404 /404

RewriteRule ^battery/([^/]+)$ /browser/product?sku=BATTERY+$1&type=battery
RewriteRule ^vehicles/([^/]+)/([^/]+)/([^/]+)/product([0-9]+)$ /browser/index.php?make=$1&model=$2&id=$3 [L,NC]
RewriteRule ^vehicles/([^/]+)/([^/]+)/([^/]+)/([0-9]+)$ /browser/product.php?make=$1&model=$2&year=$3&id=$4 [L,NC]
RewriteRule ^vehicles/([^/]+)/([^/]+)/([^/]+)$ /browser/index.php?make=$1&model=$2&year=$3 [L,NC]
RewriteRule ^vehicles/([^/]+)/([^/]+)$ /browser/index.php?make=$1&model=$2 [L,NC]
RewriteRule ^vehicles/([^/]+)$ /browser/index.php?make=$1 [L,NC]
RewriteRule ^vehicles/$ /browser/index.php [L,NC]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php

© Stack Overflow or respective owner

Related posts about .htaccess

Related posts about configuration