Mombu the Php Forum

Go Back   Mombu the Php Forum > Php > intercepting URLs in a "control-system"
User Name
Password
REGISTER NOW! Mark Forums Read




Reply
1 3rd July 16:32
slanger
External User
 
Posts: 1
Default intercepting URLs in a "control-system"



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
  Reply With Quote


 


Reply


Thread Tools
Display Modes




666