.htaccess - need help. rewriterule not working with /? -


my url

http://example.com/?aff_id=username  

and want

http://example.com/?ap_id=username 

i have tried possible ways no luck. if removed ? (question mark) works want ? in url. know regular expression tried escape no luck.

you can use following in /.htaccess file:

rewriteengine on rewritecond %{query_string} aff_id=([\w]+) [nc] rewriterule ^$ /?ap_id=%1 [r,l] 

if make redirect permanent, change r r=301.


Comments

Popular posts from this blog

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

android - MPAndroidChart - How to add Annotations or images to the chart -