Re: URL rewriting.
| From: | Kurth Bemis | Date: | Mon, 23 Oct 2000 19:17:33 +0000 |
| Subject: | Re: URL rewriting. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-21798@lists.php.net to get a copy of this message | ||
At 10:13 AM 10/23/2000 -0300, Jeff MacDonald wrote:
look at this.. this does what you need..i use it all the time...
===================snip==================
$requested_page = getenv("PATH_INFO");
$allowed_pages = array(
"main",
"search",
);
foreach ($allowed_page as $this_page)
if ($requested_page == $this_page) {
include "$page.html";
$madeit = true;
}
if (!$madeit) include "default.html"; // or display an error message
===================snip==================
(PHP4 syntax; you'll have to use the while(list() = each()) form instead of
foreach if you're using PHP3.)
hope this helps
~kurth
Hi I want to increase the visibility of my site on search engines but representing urls likeKurth Bemis - Network/Systems Administrator, USAExpress.net/Ozone Computer There is no sin except stupidity. -- Oscar Wilde kurth@usaexpress.net | http://www.usaexpress.net/kurth PGP key available - http://www.usaexpress.net/kurth/pgp Fight Weak Encryption! Donate your wasted CPU cycles to Distributed.net (http://www.distributed.net)http://www.foo.com/narf.php/uid/10034instead ofhttp://www.foo.com/narf.php?uid=10034does php have any settings for this , or should i use apache mod_rewrite, and if so does anyone in this list have any experience with mod_rewrite where they could help meout.. thanks Jeff MacDonald, -----------------------------------------------------PostgreSQL Inc | Hub.Org Networking Services jeff@pgsql.com | jeff@hub.org www.pgsql.com | www.hub.org 1-902-542-0713 | 1-902-542-3657----------------------------------------------------- Facsimile : 1 902 542 5386 IRC Nick : bignose -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net