Hi.

Working with 'Windows Server 2003' + 'IIS 6.0' + 'PHP 4.3.11', I'd
like to use:
http://www.foo.com/script.php/john/23/

I created this 'script.php':

<?
$myUrl = $_SERVER['PATH_INFO'];
print "<li>$myUrl\n";

?>

It works OK with 'foo.com/script.php', but when trying

'foo.com/script.php/john/23/', I get this 404 error message:

The page cannot be found
The page you are looking for might have been removed, had its name

changed, or is temporarily unavailable.

Is it possible to work with these kind of scripts and IIS?

Thank you very much.

    As far as I know, ASP.NET does URL mapping, but only for filetypes like 'aspx', 'ascx', etc.

    Can I implement it to fix my problem?

      4 days later

      garriman:

      I'm not sure, but I think the last file name has to be an executable.

      'foo.com/script.php' would work because script.php is an executable file (script.php)

      'foo.com/script/john/23.php' would also work, because the last file is an executable file (23.php), but 'foo.com/script.php/john/23 won't work because there is no executable file at the end.

      If you want to open 'john/23' you are going to have to open your page 'foo.com/script.php and then call 'john/23' from within your page after your page loads.

      "ASP.NET does URL mapping. Can I implement it to fix my problem?"

      NO! I am pretty sure that, that would not work.

      Your problem is not URL mapping. I am sure the file 23 is in the path Script.php/john, but like I said, it won't execute because it is not an executable file.

      Hope this helps.

      Good Luck

        I don't think that "john" nor "23" is supposed to be a file. They obviously aren't, or the 404 wouldn't be there. I believe the OP wants to use URI based variables for "search engine compatibility" ....

        On the Apache web server this is accomplished by the ForceLocal directive, IIRC. I don't know if IIS has similar functionality, or not. If so, it's probably called something different. Perhaps you can Google up a solution ... good luck.

          Write a Reply...