This is a discussion on Re: [PHP] intercepting URLs in a "control-system" within the PHP General forums, part of the PHP Programming Forums category; Hello If you are using PHP as an Apachemodule you also have the option of using a url like http://...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hello
If you are using PHP as an Apachemodule you also have the option of using a url like http://example.com/index.php/test/test.html Apache will see that test.html is not available and will travel down the directory path til it gets to the index.php (which should exist BTW) and call that script. This seems to work on most default installation of apache using php as apachemodule. (Don't know if this is true for all apache installations and if this still works on apache2) In index.php you can parse the requesturi and decode it appropriatly. Be aware this only works on apache with php as a module and it might not be as fast as mod_rewrite ( and as clean) but it can be used on servers that don't have mod_rewrite installed or where you don't have access to the config or htaccess. Regards Stefan Langer |
|
|||
|
>If you are using PHP as an Apachemodule you also have the option of using
>a url like >http://example.com/index.php/test/test.html >Apache will see that test.html is not available and will travel down the >directory path til it gets to the index.php (which should exist BTW) and >call that script. >This seems to work on most default installation of apache using php as >apachemodule. (Don't know if this is true for all apache installations and >if this still works on apache2) This came up here a week or so ago - it will work with Apache 2.0 if the AcceptPathInfo directive is set correctly: <http://httpd.apache.org/docs-2.0/mod/core.html#acceptpathinfo> --------------------------------------------------------------------- michal migurski- contact info and pgp key: sf/ca http://mike.teczno.com/contact.html |