• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 788
  • Last Modified:

AdWords gclid isapi rewrite rules httpd.ini

That's what my httpd.ini looks like:

RewriteCond Host: ^mywebsite\.ch

RewriteRule (.*) http\://www\.mywebsite\.ch$1 [I,RP]




RewriteRule /(\d*)/(\w+)/(\S+)                  /default.asp\?navig=$1&q=$2&s=$3

RewriteRule /(\d*)/(\S+)                        /default.asp\?navig=$1&q=$2

RewriteRule /(\d*)/((.*)                        /default.asp\?navig=$1&q=$2

I tried to change the line

RewriteRule /(\d*)/(\w+)/(\S+)                  /default.asp\?navig=$1&q=$2&s=$3

into this:

RewriteRule /(\d*)/(\S+)/(\S+)\?gclid=(\S+)            /default.asp\?navig=$1&q=$2&s=$3&gclid=$4

But when I enter the address:

http://www.mywebsite.ch/100/deutsch/Somekeyword?gclid=test

the site is forwarded to:

http://www.mywebsite.ch/100/deutsch/Somekeyword

And I don't understand what I'm doing wrong, since the regexpr-pattern works as expected in the test-tool.

What am I doing wrong?
0
cricket82
Asked:
cricket82
  • 2
2 Solutions
 
käµfm³d 👽Commented:
How about this?
RewriteRule /(\d+)/([^/]+)/([^?]+)\?gclid=(.+)   /default.asp?navig=$1&q=$2&s=$3&gclid=$4 [NE]

Open in new window

0
 
cricket82Author Commented:
I tried it myself and it worked with the following rules:
RewriteRule /(\d*)/(\w+)/(\S+)\?gclid=(\S+)		/default.asp\?navig=$1&q=$2&s=$3&gclid=$4

RewriteRule /(\d*)/(\S+)\?gclid=(\S+)			/default.asp\?navig=$1&q=$2&gclid=$3

RewriteRule /\?gclid=(\S+)				/default.asp\?gclid=$1



RewriteRule /(\d*)/(\w+)/(\S+)				/default.asp\?navig=$1&q=$2&s=$3

RewriteRule /(\d*)/(\S+)				/default.asp\?navig=$1&q=$2 

RewriteRule /(\d*)/(.*)					/default.asp\?navig=$1&q=$2

Open in new window

0
 
cricket82Author Commented:
Both solutions worked. I contacted server-admin intependentely and I guess it was a server sided problem right from the beginning, but both solutions work and maybe helps someone.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now