#1
  1. No Profile Picture
    Contributing User
    ASP Explorer (0 - 99 posts)

    Join Date
    Aug 2006
    Posts
    34
    Rep Power
    12

    ASP and the URL Rewrite Module in IIS7 Problem


    Hi,
    I have a classic asp dynamic website. I wanted to optimize the urls of the website and now i am try to make the IIS7 URL Rewrite module to work on my website. I consulted with the administrator of me web server and he told me that the only thing i have to do is to write some rules in a web.config file and that is it. And here is my problem: I have written the web.config file and uploaded it to the website and nothing happens. I am posting the web.confg file code here for you to look and tell me what is wrong with the code or if everything is correct what might be the problem. So here it is:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
      <system.webServer>
       <rewrite>
      <rules>
        <rule name="Rewrite to games.asp">
          <match url="^games/([0-9]+)/([_0-9a-z-]+)" />
          <action type="Rewrite" url="games.aspx?gameid={R:1}&amp;name1={R:2}" />
        </rule>
      </rules>
    </rewrite>
      </system.webServer>
    </configuration>
    I have a page called games.asp with two variables gameid (numeric) and name1 (text title).

    Please let me know what am i doing wrong.
    Thanks in advance.

    Rumen
  2. #2
  3. Moderator
    ASP Super Hero (2500 - 2999 posts)

    Join Date
    Dec 2006
    Location
    West London, UK
    Posts
    2,715
    Rep Power
    935
    Moved to ASP Development forum.
    Hope this advice helps.

    If so please show your appreciation by adding reputation points (click the Give Rep button on the bottom bar of the post).

    - Post your code - Post your errors - Be clear - Be courteous -

    AND PLEASE...Finalise your thread with a solution or confirmation that the last advice worked or failed.

    Visit My ASP Free Members Club Profile
  4. #3
  5. No Profile Picture
    Contributing User
    ASP Explorer (0 - 99 posts)

    Join Date
    Apr 2009
    Location
    Essex
    Posts
    33
    Rep Power
    10
    Try these, i asked the same question about a year ago and everyone pointed me to these links.

    http://forums.aspfree.com/code-bank-54/url-rewrite-using-asp-157948.html


    http://forums.aspfree.com/code-bank-54/url-rewriting-with-asp-iis-102550.html
  6. #4
  7. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Aug 2011
    Location
    London
    Posts
    11
    Rep Power
    0

    May be some help


    In your question, you say you want this for classic ASP application. In your web.config ruling, you have referenced an .ASPX page.

    Is this right? Surely it should be games.asp not games.aspx

IMN logo majestic logo threadwatch logo seochat tools logo