Mod Rewrite 500 Internal Server Error Problem.

Posted by HELP on Stack Overflow See other posts from Stack Overflow or by HELP
Published on 2010-12-26T05:43:07Z Indexed on 2010/12/26 5:54 UTC
Read the original article Hit count: 252

Filed under:

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>

© Stack Overflow or respective owner

Related posts about mod-rewrite