Help with ?gclid

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 4
Joined: 26 Jan 2016, 05:34

Help with ?gclid

26 Jan 2016, 05:50

Hi,

At this point I'm using the following rule for the use of AdWords-autotagging:
RewriteRule ^/([?gclid]*)$ / [NC, L]

So "http://www.mysite.com/?gclid=TeSter-123" is working fine.

Now I want to add a new level like e.g.
"http://www.mysite.com/level/?gclid=TeSter-123"

With the rule above css and images cannot be invoked properly.

Thanks for your help in advance!

User avatar
Posts: 402
Joined: 06 Mar 2012, 11:59

Re: Help with ?gclid

29 Jan 2016, 14:53

Hello.

Can you please explain what is the purpose of your rule (it is not obvious from the syntax itself), so I could write a new rule for you.

User avatar
Posts: 4
Joined: 26 Jan 2016, 05:34

Re: Help with ?gclid

01 Feb 2016, 11:15

The purpose of my rule is that I want to add a level e.g.
"http://www.mysite.com/?gclid=TeSter-123"
becomes
"http://www.mysite.com/level1/?gclid=TeSter-123"

In the last case it cannot find pictures and css files

User avatar
Posts: 402
Joined: 06 Mar 2012, 11:59

Re: Help with ?gclid

02 Feb 2016, 09:38

The rule adds "level"?
I can tell you what your rule actually does according to syntax: it matches all requests started with '/' and followed by any number of either '?'s, 'g's, 'c's, etc. and internally rewrites these requests to the homepage. Seems quite senseless to me. So I am asking you to explain what you are actually trying to reach because nither from your message nor from the rule syntax itself can I suppose what is the purpose of the rule.

User avatar
Posts: 4
Joined: 26 Jan 2016, 05:34

Re: Help with ?gclid

02 Feb 2016, 11:30

I can show you in an example.
If you use http://www.prijsprinter.nl/?gclid=TeSter-123 everything work fine.

I want to expand the URL to
http://www.prijsprinter.nl/home_perfect ... TeSter-123

You will see that pictures an css cannot be found

User avatar
Posts: 402
Joined: 06 Mar 2012, 11:59

Re: Help with ?gclid

02 Feb 2016, 12:58

The rule you are pointing has nothing to do with your css files, if you remove it files will still be missing. CSS files don't work because your page has them linked using relative links, therefore, browser is looking for files in http://www.prijsprinter.nl/home_perfect/css... Use absolute or root-relative links.

User avatar
Posts: 4
Joined: 26 Jan 2016, 05:34

Re: Help with ?gclid

03 Feb 2016, 06:03

Hello Yaroslav,

I've made the links root-relative. This worked for me.
Thanks for your help!

Regards

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 7 guests