Mod Rewrite 500 Internal Server Error Problem.
- by HELP
I keep getting a 500 Internal Server Error when I try to change Example 1 to Example 2 using mod_rewrite. Can someone help me fix this problem?
Example 1
http://www.example.com/posts/1/abcd
Example 2
http://www.example.com/posts.php?aid=$1
Here is my mod rewrite.
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://www.example.com/ [R=301,L]
RewriteRule ^(-[1-9]+)? $ http://www.example.com/posts.php?aid=$1 [L]
</IfModule>