#1
  1. No Profile Picture
    Devshed Gringo
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2000
    Location
    Toronto, Ontario
    Posts
    448
    Rep Power
    61

    Rewrite rule that's killing me!


    I've been trying to do the following:

    index.cfm?ci_id=7486&la_id=1

    Redirects to

    www.test.com

    But the "?" just kills me each time. Any help will be appreciated. Thanks so much...

    P.S. I moved an old CFM based CMS to Dotnetnuke and a few pages that I need to add a 301 redirect to... I tried using wildcards *7486* but I keep getting a 404 error?


    Still don't know how to do a "Hello World"?
  2. #2
  3. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,056
    Rep Power
    9398
    Not being intimately familiar with IIS's URL rewriting, I would guess that it works the same way as others: by looking at the path only and not the query string. You have to do something specific to have it look at the query string.

    But a 404? Does index.cfm not exist? Should you be redirecting from that instead?

    Comments on this post

    • -=-steve-=- agrees : Thanks for the reply
  4. #3
  5. No Profile Picture
    Devshed Gringo
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2000
    Location
    Toronto, Ontario
    Posts
    448
    Rep Power
    61
    Originally Posted by requinix
    Not being intimately familiar with IIS's URL rewriting, I would guess that it works the same way as others: by looking at the path only and not the query string. You have to do something specific to have it look at the query string.

    But a 404? Does index.cfm not exist? Should you be redirecting from that instead?
    Thanks for the reply, index.cfm does not exist in that site. My guess is, as soon as it see's the "?" it breaks the redirect. When I remove the "?", the redirect works?

    Thanks
    Still don't know how to do a "Hello World"?
  6. #4
  7. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,056
    Rep Power
    9398
    Right. Because it matches against the path and not the query string. You have to remove the query string to get it to match, then optionally add in something to check the query string (if you really do need that).

    Using the URL Rewrite Module

IMN logo majestic logo threadwatch logo seochat tools logo