mod_rewrite enabled, but .htaccess does not work
I'm having a problem with my .htaccess.
on the phpinfo() page, I see that 'mod_rewrite' is in the 'loaded mo开发者_运维技巧dules' under 'apache2handler', but my .htaccess does not work..
.htaccess
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /index.php
Do I have an error with .htaccess?
If you have an error with .htaccess Apache will generally give you a 500 response. To be honest, a "cheap" way that I use to make sure I have my configuration correct is to put garbage like "alksdjfalsdkjf" in .htaccess - error 500 means I enabled it, no error means I forgot something. ;)
You might want to check your AllowOverride settings.
Try adding
Options +FollowSymLinks
Above rewrite engine on and see if that works
精彩评论