Welcome to WebmasterWorld Guest from 54.167.175.157

Forum Moderators: phranque

Htaccess problem with rewriting the gclid querystring

   
8:29 am on Apr 23, 2009 (gmt 0)

5+ Year Member



I have problems with rewriting for the gclid querystring.
This is what I want:

http://www.example.com/?gclid=abcdetc
should be:
http://www.example.com/redirect,?gclid=abcdetc

http://www.example.com/page/?gclid=abcdetc
should be:
http://www.example.com/page/redirect,?gclid=abcdetc

http://www.example.com/page/subpage/?gclid=abcdetc
should be:
http://www.example.com/page/subpage/redirect,?gclid=abcdetc

This is a part of my htaccess:

## search for query string "gclid"
RewriteCond %{QUERY_STRING} ^(gclid=.*)$
## ignore url's with "redirect,"
RewriteCond %{REQUEST_URI} !(.*?)redirect,(.*?)$

... a redirect rule over here ? ...

## get mvc index to build site
RewriteRule (.*) /html/$1 [L]

Please tell me how to solve this.

[edited by: encyclo at 2:20 am (utc) on June 5, 2009]
[edit reason] switched to example.com [/edit]

4:51 pm on Apr 23, 2009 (gmt 0)

WebmasterWorld Senior Member wilderness is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



There are frequent requests in the Apache Server Forum [webmasterworld.com].

A search of question+mark at Webmaster World [google.com] provided many references.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month