Re: URL Rewrite not working for me

From: Date: Fri, 25 Jul 2008 11:41:00 +0000
Subject: Re: URL Rewrite not working for me
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-277299@lists.php.net to get a copy of this message
Hi Per, changed the rewrite to this Options +FollowSymLinks RewriteEngine on RewriteRule profile/username/(.*) profile.php?username=$1 [r] but sill does not work the way i want. Entering this url http://example.com/profiles/profile.php?username=baller does not cnage to http://localhost/profiles/profile/username/baller --- On Fri, 7/25/08, Per Jessen <per@computer.org> wrote: > From: Per Jessen <per@computer.org> > Subject: Re: [PHP] URL Rewrite not working for me > To: php-general@lists.php.net > Date: Friday, July 25, 2008, 3:15 AM > Don Don wrote: > > > Hi all, > > > > I've set up a url rewrite code below. > > > > Options +FollowSymLinks > > RewriteEngine on > > > > RewriteRule profile/username/(.*) > profile.php?username=$1 > > > > It only works when I type in this url > > > http://www.example.com/profiles/profile/username/baller/ > > > > If i do not then the normal url > > > http://www.example.com/profiles/profile.php?username=baller > is > > displayed. > > > > I just want the new url to show when ever I trype in > the old url. > > Ah, you want an external redirect then. It's really a > case of RTFM, but > just add '[r]' to the end of your RewriteRule. > > > > /Per Jessen, Zürich > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#277299) next »