Results 1 to 5 of 5

Thread: URL Rewrite

  1. #1
    Join Date
    Dec 2011
    Posts
    6

    Default URL Rewrite

    I am having trouble getting a rewrite rule to work. I have other rules that are working just fine, but I can't seem to get the simplest of rules to work.

    This rule:

    RewriteRule \?BikeID=(\d+) /redirect/redirect.cfm [NS,L]

    Should push this request

    I want this link http://flyingpiston2012-com.securec3...m/?bikeid=2069

    To this URL

    http://flyingpiston2012-com.securec3...t/redirect.cfm

    But it doesn't. I have tried everything imaginable. How should I modify this rule?

  2. #2
    Join Date
    May 2010
    Posts
    20

    Default

    Evik,

    We updated your permissions to allow for isapi_rewrite rules to work correctly for your domain.
    But in regards with the rules you have set you will need to include [QSA] for any rule regarding an ID that is queried.

    If you run into further issues with your rewrite rules you will need to submit a support ticket.

  3. #3
    Join Date
    Dec 2011
    Posts
    6

    Default No answer

    Quote Originally Posted by CalebC View Post
    Evik,

    We updated your permissions to allow for isapi_rewrite rules to work correctly for your domain.
    But in regards with the rules you have set you will need to include [QSA] for any rule regarding an ID that is queried.

    If you run into further issues with your rewrite rules you will need to submit a support ticket.
    Most of the rules were already working correctly, so some level of permission already existed.

    It seems that nothing has changed. Everything that was working is still working. Everything that was NOT working, is still NOT working.

    You didn't answer the question as to why one rule wasn't working. Is there a reason you didn't answer this question or address it?

  4. #4
    Join Date
    Dec 2011
    Posts
    6

    Default Error

    I am trying to write a rewrite rule so that any URL with a BikeID will get redirected to a specific page. I have this as the first rule on the page. The other rules I have are working just fine.

    Here is my rule:

    RewriteEngine on
    RewriteRule ^bikeid* /redirect/redirect.cfm [NC,NS,L]

    This rule works for this URL

    http://flyingpiston2012-com.securec3...om/bikeid=2069

    This rule does NOT work for this URL

    http://flyingpiston2012-com.securec3...m/?bikeid=2069
    Other rules that I have tried that do not work are as follows:

    RewriteRule ^bikeid* /redirect/redirect.cfm [NC,NS,L]
    RewriteRule ^*bikeid* /redirect/redirect.cfm [NC,NS,L]
    RewriteRule *bikeid* /redirect/redirect.cfm [NC,NS,L]
    RewriteRule \?*bikeid* /redirect/redirect.cfm [NC,NS,L]
    RewriteRule ^\?*bikeid* /redirect/redirect.cfm [NC,NS,L]
    RewriteRule ^\?bikeid* /redirect/redirect.cfm [NC,NS,L]

    What do I have to put in the rule to match any URL that contains the phrase "bikeid"?

  5. #5
    Join Date
    May 2010
    Posts
    20

    Default

    You do not have anything that will handle a query string.

    This will work with your current script but this will happen with all query string request for your domain.

    RewriteCond %{QUERY_STRING} .+
    RewriteRule (.*) /redirect/redirect.cfm$1? [NC,NS,R=301,L]

    We updated and placed this at the bottom of your existing .htaccess file.
    Please respond with further issues with your Ticket that you submitted.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •