0

I'm trying to duplicate something that's being done on a website that seems a bit weird. They are serving both

h**p://site.com/script.php      

      AND

h**p://site.com/script.php/file1

This doesn't seem to make any sense to me. script.php is clearly a PHP file that will get interpreted and have its output returned. file1 seems like its some sort of file in the script.php directory, but no operating system is going to allow a file and a directory to share the same name.

What's going on here? Do I need to configure my server and/or PHP to do something this funky?

bcosca
  • 17,371
  • 5
  • 40
  • 51
Sander Smith
  • 1,371
  • 4
  • 20
  • 30
  • 1
    possible duplicate of [Something rewrites rules for php when Apache mod_rewrite module is disabled](http://stackoverflow.com/questions/3747871/something-rewrites-rules-for-php-when-apache-mod-rewrite-module-is-disabled) – Pekka Oct 08 '10 at 18:04
  • The dupe deals with the exact opposite but the solution is the same – Pekka Oct 08 '10 at 18:04

1 Answers1

0

In the second example, "file1" is being passed as a parameter to the "script.php" CGI program. This is a little-known but fully supported CGI syntax. See Section 3.2 of http://www.rfc-editor.org/rfc/rfc3875.txt.

nobody
  • 19,814
  • 17
  • 56
  • 77