Welcome Guest, Not a member yet? Register   Sign In
Query String Problem - GoogleAd
#1

[eluser]coldfire82[/eluser]
The problem is to be solved asap. And I appreciate the quick solution very much.

As my google Ad was running today running and I was not dealing with querystring earlier and now on clicking my Ad it tries to go to the URL

http://www.mysite.com/?gclid=SOMERANDOMCODE1234

So, on clicking, it generates 404 page not found.

And, what I need is to redirect the above link to mysite.com simply.

I have enabled querystring

$config['enable_query_strings'] = TRUE;

But that doesnt seems to work as 'glcid ' is not a controller trigger.

Can anyone help ASAP.

-
#2

[eluser]coldfire82[/eluser]
[quote author="coldfire82" date="1275403164"]The problem is to be solved asap. And I appreciate the quick solution very much.

As my google Ad was running today running and I was not dealing with querystring earlier and now on clicking my Ad it tries to go to the URL

http://www.mysite.com/?gclid=SOMERANDOMCODE1234

So, on clicking, it generates 404 page not found.

And, what I need is to redirect the above link to mysite.com simply.

I have enabled querystring

$config['enable_query_strings'] = TRUE;

But that doesnt seems to work as 'glcid ' is not a controller trigger.

Can anyone help ASAP.

-[/quote]

in-experience me

Solved it with a simple rewrite rule in .htaccess
Code:
RewriteCond %{QUERY_STRING} ^gclid=(.*)
RewriteRule ^$ index.php?/$1 [L]
#3

[eluser]coldfire82[/eluser]
here is the pickle right now

I have URLs

For City = 1
Code:
http://www.mysite.com/customer/city/1?gclid=1kn23k12j1b32l12lj3

For City = 2
Code:
http://www.mysite.com/customer/city/2?gclid=1kn23k12j1b32l12lj3

the rewrite rule I was previously using was for this url

Code:
http://www.mysite.com/?gclid=1kn23k12j1b32l12lj3
it is below
Code:
RewriteCond %{QUERY_STRING} ^gclid=(.*)
RewriteRule ^$ index.php?/$1 [L]

and the above rule worked perfectly. BUT, now for the new URLs for different cities (city 1 & 2), what should I change in the rewriteCond and Rule OR add something?
I am getting the following error:

Code:
The URI you submitted has disallowed characters.


I am not expert in this. Please reply asap

-




Theme © iAndrew 2016 - Forum software by © MyBB