.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

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

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -