htaccess file works on server, doesn't work locally

I've been searching around and trying all sorts of different approaches, but I can't seem to figure out what's wrong.

I have the following piece of .htaccess code:

Options +FollowSymLinks
IndexIgnore */*
# Turn on the RewriteEngine
RewriteEngine On
#  Rules
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]

It works fine on the production server, so that insinuates that the config file is set up okay there. I'm trying to develop for this site locally though, and there I get 404 errors saying that the file does not exist when I go to localhost/example/login (which corresponds with domain.com/login).

I have tried different settings, setting AllowOverride All, checking if mod_rewrite is enabled in phpinfo(); and what not. But I can't seem to figure out what's wrong.

Any suggestions?

Upvotes: 0

Views: 1065

Answers (1)

Alexey Sidorov
Alexey Sidorov

Reputation: 866

check out if mod_rewrite is enabled. Don`t forget to restart apache. Check your virtualhosts, is allow override is on?

Upvotes: 3

Related Questions