Re-writes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • harshmaul
    Recognized Expert Contributor
    • Jul 2007
    • 490

    Re-writes

    Hi all,
    Quick question i hope...
    so i have IIS with ISAPI re-writes...
    for arguements sake lets say i want to
    Code:
    Response.Write
    this out.
    How would i do that?

    A bit more detail in case my description is vaigue....
    I have re written the page...

    Code:
    /index.aspx?type=forums&title=london-2007
    to be like this...

    Code:
    /forums/london-2007/
    How do i capture the re-written URL (/forums/london-2007/)

    any ideas would be grately apresiated
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    If I understand re-writing correctly, your asp.net page will still see the name|value pairs.

    So when a user types:
    /forums/london-2007/
    Your page will still function as if they had entered
    /index.aspx?type =forums&title=l ondon-2007

    So you go do Request["type"] and get the "forums" value and so on.

    Comment

    • harshmaul
      Recognized Expert Contributor
      • Jul 2007
      • 490

      #3
      Hmmm... i could build it on the page... only problem there is i will need to use it accross the whole site... but cheers for the input....

      I do think i have cracked it however using this....

      Code:
      Request.ServerVariables["HTTP_X_REWRITE_URL"]
      I think the isapi agent filter thingy bobby adds extra server variables to the request header. so i'm gonna go with that!!! but cheers again

      Comment

      Working...