[nycphp-talk] Restian PHP on IIS with encoded urls
Joelle Tegwen
tegwe002 at umn.edu
Wed Oct 8 16:19:45 EDT 2008
I'm writing a web services application on PHP 5.2. I develop on
Linux/Apache but our test/production servers are running IIS 6 So I'm
kind of clueless about how to configure IIS.
Thanks in advance for any assistance.
The problem that I'm having is that IIS is decoding encoded portions of
my urls before they hit php, and that is making parsing an encoded rest
url very difficult.
I did google this and found a server variable "UNENCODED_URL" but it
doesn't seem to be populated on my server. I found some references to
the IIS Metabase, but nothing about what I would change to get what I
want out of the server.
Short version of the question:
How do I get the original encoded URL in IIS?
The URL I'm parsing is:
http://localhost/resources/services.php/ttaf/transform/http%3A%2F%2Ficitest1.education.umn.edu%2Fici%2Fwelcome%2Fcaptions_ici_ttf.xml/http%3A%2F%2Ficitest1.education.umn.edu%2Fici%2Fwelcome%2Ftranscript.xsl
Which I want to parse to
ttaf
transform
http%3A%2F%2Flocalhost%2Fici%2Fwelcome%2Fcaptions_ici_ttf.xml
http%3A%2F%2Ficitest1.education.umn.edu%2Fici%2Fwelcome%2Ftranscript.xsl
Long explanation if needed/useful:
To reduce the complexity of maintaining web server environments on
several machines (developer and servers) we try to do everything inside
of native PHP. This means no mod_rewrite or similar tools unless they
are irreplaceable.
In Apache I get
[REQUEST_URI] =>
/resources/services.php/ttaf/transform/http%3A%2F%2Flocalhost%2Fsandbox%2Fflashxslt%2Fcaptions_ici_ttf.xml/http%3A%2F%2Flocalhost%2Fsandbox%2Fflashxslt%2Ftranscript.xsl
[SCRIPT_NAME] => /resources/services.php
which I can then parse out.
In IIS I get:
[PATH_INFO] =>
/ttaf/transform/http:/icitest1.education.umn.edu/ici/welcome/captions_ici_ttf.xml/http:/icitest1.education.umn.edu/ici/welcome/transcript.xsl
[PATH_TRANSLATED] =>
c:/inetpub/wwwroot/ttaf/transform/http:/icitest1.education.umn.edu/ici/welcome/captions_ici_ttf.xml/http:/icitest1.education.umn.edu/ici/welc
[ORIG_PATH_INFO] =>
/resources/services.php/ttaf/transform/http:/icitest1.education.umn.edu/ici/welcome/captions_ici_ttf.xml/http:/icitest1.education.umn.edu/ici/welcome/transcript.xsl
[ORIG_PATH_TRANSLATED] =>
c:\inetpub\wwwroot\resources\services.php\ttaf\transform\http:\icitest1.education.umn.edu\ici\welcome\captions_ici_ttf.xml\http:\icitest1.education.umn.edu\ici\welcome\transcript.xsl
But they're all already decoded.
Thanks!
Joelle
More information about the talk
mailing list