Re: php invocation

From: Date: Wed, 16 Apr 2003 18:47:15 +0000
Subject: Re: php invocation
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-144174@lists.php.net to get a copy of this message
Alexei, AM> than mine advise me: AM> Is it possible to translate AM> urlpath/page1.html AM> into a call to php script with page1.html as AM> an argument? If yes, how? There are lots of ways to do this, depending on your needs. If you don't have admin rights on your server, you could simply have a real file at /urlpath/page1.html with a little php which could call your script. Crude, but perfectly effective. If you do have admin rights, on apache you could use mod-rewrite to re-route your virtual urls to the real script you want to run. Other major webservers have similar features. Mod-rewrite looks intimidating, but if you look at the examples in the apache docs you should quickly get the idea. My own approach is to use mod-rewrite to route all non-image requests to a single script, which parses the request urls and calls the relevant parts of the application. You have to write your rewrite rule so that image GET requests are allowed through to the actual image files. Mod-rewrite is a thing of wonder - well worth a look. -- Geoff Caplan Advantae Ltd http://www.advantae.com

« previous php.general (#144174) next »