Re: URL rewriting.

From: Date: Thu, 26 Oct 2000 05:35:37 +0000
Subject: Re: URL rewriting.
Groups: php.general 
Request: Send a blank email to php-general+get-22052@lists.php.net to get a copy of this message
here is an excellent article for you: http://www.phpbuilder.com/columns/tim20000526.php3 in addition, there is a how-to for modrewrite on the apache site which will help you do just what you described. --- Kurth Bemis <kurth@usaexpress.net> wrote: > 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 like > > > > http://www.foo.com/narf.php/uid/10034 > > > > instead of > > > > http://www.foo.com/narf.php?uid=10034 > > > >does 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 > > Kurth 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) > > > > -- > 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 > __________________________________________________ Do You Yahoo!? Yahoo! Messenger - Talk while you surf! It's FREE. http://im.yahoo.com/

« previous php.general (#22052) next »