Skip to main content
Inspiring
February 4, 2009
Answered

Getting the Rewritten URL from IIS with ISAPI rewrite

  • February 4, 2009
  • 1 reply
  • 725 views
OK,
Does anyone have any experience of this problem? In mod_rewrite to get the URL requested before it is rewritten you can use cgi.redirect_url which is populated be Apache.

e.g. if we have http://www.mysite.com/news/1234/my+title/ which is redirected to http://www.mysite.com/news/index.cfm?fuseaction=details&nNewsID=1234 then cgi.redirect_url will be news/1234/my+title/ which you cannot normally get from the standard cgi variables.
I am in the process of migrating all my sites from Apache to IIS6 and I am using Helicon's ISAPI Rewrite 3 to accommodate my rewriting that I have been doing with mod_rewrite but I need to be able to get this information in ColdFusion.

Does anyone know how to get this information?

Thanks.
    This topic has been closed for replies.
    Correct answer Stressed_Simon
    It is OK, I have solved it. You can use cgi.HTTP_X_REWRITE_URL.

    1 reply

    Stressed_SimonAuthorCorrect answer
    Inspiring
    February 4, 2009
    It is OK, I have solved it. You can use cgi.HTTP_X_REWRITE_URL.