What's wrong with this Apache rewrite rule?
Here's my .htaccess
:
RewriteEngine On
RewriteRule ^([^/]+)$ /index.php?id=$1 [L]
And requests keep causing a 500.
You are entering rewrite loop. Change it like this:
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/index\.php [NC]
RewriteRule ^([^/]+)$ /index.php?id=$1 [QSA,L]
or like this (should have the same effect behind):
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)$ /index.php?id=$1 [QSA,L]
精彩评论