trying to do rewrite rule for this:
http://website.com/checkreg/34324234 <--- Old URL Locationto this: http://website.com/chkreg.php?checkreg=34324234 <--- New URL Address
I've tried the following, but it causes an error 500 message, I don't know enough about ModRewrite to figure out the issue.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngi开发者_Go百科ne On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^checkreg/([^/]*)$ /chkreg.php?checkreg=$1 [L]
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
You said you want to rewrite from http://website.com/chkreg.php?checkreg=34324234 to http://website.com/checkreg/34324234, but your rewrite rule is doing the opposite.
Use this:
RewriteRule ^chkreg.php?checkreg=(.*) /checkreg/$1 [L]
Edit: If you need further debugging information from mod_rewrite then add the following:
RewriteLog /your/path/rewrite.log
RewriteLogLevel 3
精彩评论