Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Handle all subdirectories with one script

Status
Not open for further replies.

larrystrickland

Technical User
Oct 28, 2006
1
CA
Hi,

I'm new at this, but I have what appears to be a simple task, I just cannot find how to do it.

What I'm trying to do, is to have a server receive a HTTP request, and process it with one php script.

To function the script will need access to the full URL requested and any get or post parameters, cookies might also be required.

Regards,

Larry
 
Hi

Use the Rewrite Engine, put this in the configuration file :
Code:
RewriteEngine on
RewriteCond %{REQUEST_URI} !/path/to/handleall.php
RewriteRule (.*) /path/to/handleall.php?url=$1&%{QUERY_STRING}
This way the handleall.php script will receive all the data, plus the original request in the url GET parameter.

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top