AdWords gclid isapi rewrite rules httpd.ini

Posted on 2011-05-03
Last Modified: 2012-05-11
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:

the site is forwarded to:

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?
Question by:cricket82
    LVL 74

    Accepted Solution

    How about this?
    RewriteRule /(\d+)/([^/]+)/([^?]+)\?gclid=(.+)   /default.asp?navig=$1&q=$2&s=$3&gclid=$4 [NE]

    Open in new window


    Assisted Solution

    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


    Author Closing Comment

    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.

    Featured Post

    Live: Real-Time Solutions, Start Here

    Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

    Join & Write a Comment

    The next wave of Panda releases starts with Panda2.1 After the game-changing Panda2.0 update that caused a reduction in Google search engine referral traffic to a newly affected and larger set of websites, more Panda updates were already in the pip…
    Read about how to approach blogging and about ways to do it right. Stand out from the crowd and let your knowledge be consumed by a large audience. This article aims to explain how your blog should look like,  the most important things to do while b…
    Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…
    Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now