.htaccess mod_rewrite to hide querystring variables into fake pathinfo
New to mod_rew开发者_如何学Crite under a subdirectory-esque structure. Specifically, would like to display URLs formatted like this:
http://www.oursite.com/signup/?key=xyzabc
to this:
http://www.oursite.com/signup/xyzabc
Anyone have a quick snippet for accomplishing this? Much appreciated.
RewriteRule ^signup/([a-z]*)/?$ signup/?key=$1 [NC,L,QSA]
Will do it. All time favorit is the mod_rewrite cheat sheet v2.
Just going off of memory:
RewriteRule ^/signup/?key=(.*)$ /signup/$1 [L]
精彩评论