RE: [PHP] Search Engine Friendly Url using mod_rewrite

From: Date: Mon, 26 May 2003 03:23:20 +0000
Subject: RE: [PHP] Search Engine Friendly Url using mod_rewrite
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-148950@lists.php.net to get a copy of this message
Thankyou you all, Decided to go with Wendell's suggestion which works well but am having troubles with relative image paths will take it to a more suitable list though :) Regards, Joseph -----Original Message----- From: Comex [mailto:ng@xemoc.cjb.net] Sent: Saturday, 24 May 2003 2:29 AM To: Wendell Brown; Joseph Blythe; Php-General (E-mail) Subject: Re: [PHP] Search Engine Friendly Url using mod_rewrite Wendell Brown wrote: > On Fri, 23 May 2003 17:34:33 +0930, Joseph Blythe wrote: > >> http://index.php?id=1 >> >> to: >> >> http://index.html/id/1 > > Errrr... not a php question (so we will probably both be punished, > but....), I think this will do what you want: > > RewriteEngine on > RewriteRule index.html/id/([0-9]+) index.php?id=$1 > > I'm using this type of functionality on one of my pages. Or you can use PHP (tested): [on index.php] $m = explode("/",$_SERVER['path_info']); for($i=1;$i<=count($m);$i = $i + 2) { $_GET[$m[$i - 1]] = $m[$i]; } 1.41421356237309504880168872420969807856967187537694 Yes, it's true that the above isn't not false, unless it isn't. The search is more profitable than the find. Never, ever back down. The e-mail given is a spam trap. ..==// Why not? \\==..

« previous php.general (#148950) next »