On Tue, Jun 17, 2003 at 03:57:48PM +0200, Elizabeth Mattijsen wrote:
> At 13:38 +0100 6/17/03, Joel Bernstein wrote:
> >This one is really really bugging me - can anybody suggest an
> >alternative way to do this redirection (I think it's too complicated a
> >case for mod_rewrite)?
> 
> I don't think so.  I think this should do the trick:
> 
> RewriteRule   ^/david 
>       http://foo.bar.com/?page=publicprofile.php&name=david  [R,L]
> 
> or possibly even:
> 
> RewriteRule   ^/david /?page=publicprofile.php&name=david  [R,L]
> 
> 
> It's been a while since I really fiddled with mod_rewrite much so 
> please excuse me if this doesn't do the trick after all..

I think you're misunderstanding what I'm doing. Did you read that code
attached to the first mail? Should make it clear.

Suffice to say, it's not specific cases like /david that we want to
match. it'd be a general case of "do these cases (eg, does it begin with
a '?', is it in the form /.*/.*, ...) match? if so serve directly as
Apache and mod_php normally would, otherwise if it's /.* with out
another '.' or '/', then take the local bit after the / and redirect to
/?page=page.php&name=thelocalbitgoeshere"

Does that make more sense?
> 
> 
> Liz

/joel

Reply via email to