[thelist] 404 pages?
Anthony Baratta
Anthony at Baratta.com
Sat Oct 28 17:34:51 CDT 2000
Lauri...
This is a way to pass a GET variable to a program without use the ?. Since you asked
about PHP, I'm assuming you are running apache too.
Here it goes:
First in your .htaccess file (for the target directory in question like products):
PHP3
<Location type>
ForceType application/x-httpd-php3
</Location>
PHP4
<Location type>
ForceType application/x-httpd-php
</Location>
Then create a PHP program called "type".
<?
/* Do lots of l33t code here.
Use the $PATH_INFO to capture the variable being pasted. */
$ProductNumber = substr($PATH_INFO,1);
?>
Then you can call your type program like this:
http://www.foo.com/products/type/productnumber
This will activate the PHP program called type, then type will interrogate the
PATH_INFO for the product number and spit out the proper page. Voila, one program -
search engines think its a URL.
(This was ripped out of a PHP manual from a tutorial that I went to taught by Rasmus
Lerdorf, 'the' PHP guy.)
Good Luck!!
--
Anthony Baratta
President
KeyBoard Jockeys
South Park Speaks Version 3 is here!!!
http://www.baratta.com/southpark
Powered by Tsunami
More information about the thelist
mailing list