query string rewriting

Discuss practical ways rearrange URLs using mod_rewrite.

query string rewriting

Postby jabooo01 » Mon Jun 09, 2008 3:22 am

Hiya

Cheers in advance for any help u can give ...

I've got a url like: www.someone.com/index.php?cid=bonus/ - which i need rewritten to exclude the ending '/'

i've tried

RewriteCond %{HTTP_QUERY} ^cid=bonus/
RewriteRule ^/$ /index.php?cid=bonus

But to no luck ... anyone know how this can be done? ... i've been googling but with no luck


Regards
jabooo01
 
Posts: 1
Joined: Mon Jun 09, 2008 3:17 am

Postby richardk » Mon Jun 09, 2008 1:06 pm

Where are you putting it, a .htaccess file?

Try
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteCond %{QUERY_STRING} ^cid=bonus/$ [NC]
RewriteRule ^$ /index.php?cid=bonus [L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 16 guests

cron