Re: [PHP] URL Rewrite not working for me

2008-07-25 Thread Daniel Brown
On Fri, Jul 25, 2008 at 3:59 PM, Per Jessen <[EMAIL PROTECTED]> wrote:
>
> However, Don's question was of the kind that is easily overlooked on the
> apache list, where topics tend to be a little less basic.  I tend to
> think that basic apache/php questions are sometimes better asked here,
> even if they are really off-topic.  It doesn't hurt anyone, and the
> poster is actually likely to get a decent/useful answer fairly
> quickly - due to the amount of plain user/developer experience that is
> available here.

And I agree with you on these points, but at the same time, by not
recommending that the question be asked on the appropriate list first,
we're not only encouraging misplaced posts, but also cheating the
poster themselves.  They may not even be aware that there are separate
lists; a couple of times from the top of my head, responses have been,
"I wasn't aware there was a list for [insert project name here]."

> I could easily have waved Don away with a plain "RTFM", but I saw no real 
> reason.

Yes, but that's you it's because you're a nice guy.  And what
do you expect from someone who lives in a city frequently rated as
"best quality of life" in the world?

-- 

Better prices on dedicated servers:
Intel 2.4GHz/60GB/512MB/2TB $49.99/mo.
Intel 3.06GHz/80GB/1GB/2TB $59.99/mo.
Dedicated servers, VPS, and hosting from $2.50/mo.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] URL Rewrite not working for me

2008-07-25 Thread Per Jessen
Daniel Brown wrote:

> Per's answer is probably exactly what you're looking for, Don.
> Keep in mind, though, that this isn't a PHP question.  Future
> questions of this nature would be better suited for the Apache list.

Couldn't agree more. 

> You may find sometimes that asking a question on the wrong list will
> be ignored.  Not because people don't want to help, just because they
> may read it and skip over it.

Couldn't agree more. 

However, Don's question was of the kind that is easily overlooked on the
apache list, where topics tend to be a little less basic.  I tend to
think that basic apache/php questions are sometimes better asked here,
even if they are really off-topic.  It doesn't hurt anyone, and the
poster is actually likely to get a decent/useful answer fairly
quickly - due to the amount of plain user/developer experience that is
available here. 
I could easily have waved Don away with a plain "RTFM", but I saw no
real reason.  


/Per Jessen, Zürich


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] URL Rewrite not working for me

2008-07-25 Thread Daniel Brown
On Fri, Jul 25, 2008 at 6:00 AM, Don Don <[EMAIL PROTECTED]> 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.

Per's answer is probably exactly what you're looking for, Don.
Keep in mind, though, that this isn't a PHP question.  Future
questions of this nature would be better suited for the Apache list.
You may find sometimes that asking a question on the wrong list will
be ignored.  Not because people don't want to help, just because they
may read it and skip over it.

-- 

Better prices on dedicated servers:
Intel 2.4GHz/60GB/512MB/2TB $49.99/mo.
Intel 3.06GHz/80GB/1GB/2TB $59.99/mo.
Dedicated servers, VPS, and hosting from $2.50/mo.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] URL Rewrite not working for me

2008-07-25 Thread Per Jessen
Don Don wrote:

> 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
> 

Ah, you want it the other way round then.  The rewriterule is:

rewriterule


/Per Jessen, Zürich


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] URL Rewrite not working for me

2008-07-25 Thread Raman .
Hi!!
For Internal redirection:
RewriteRule profile/username/([^/]+) profile.php?username=$1 [PT]


On Fri, Jul 25, 2008 at 3:00 AM, Don Don <[EMAIL PROTECTED]> 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.
>
> Cheers
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
http://www.kingzones.org/


Re: [PHP] URL Rewrite not working for me

2008-07-25 Thread Don Don
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 <[EMAIL PROTECTED]> wrote:

> From: Per Jessen <[EMAIL PROTECTED]>
> 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




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] URL Rewrite not working for me

2008-07-25 Thread Per Jessen
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



[PHP] URL Rewrite not working for me

2008-07-25 Thread Don Don
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.

Cheers




  

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php