httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Andersson" <rob...@profundis.nu>
Subject Re: [users@httpd] RedirectMatch regex question
Date Mon, 30 Sep 2002 07:33:10 GMT
Stephen Brooks write:
> I've been trying to redirect URLs requested as
> http://stephenbrooks.org/ral/dirs/dirORfile to a PHP script as a query in
> the form http://stephenbrooks.org/ral/index.php?dirs/dirORfile .  I have
> tried various things with the RedirectMatch command and my best attempt so
> far has been:
>
> RedirectMatch ^/ral/?([^?]*)$ http://stephenbrooks.org/ral/index.php?$1

Don't know exactly what the problem might be, but I think this should work
RedirectMatch /ral/(.*)$  http://stephenbrooks.org/ral/index.php?$1

This, of course, causes an infinite loop, but does what you want otherwise.
I tried hard with similar approach like you ([^?*), but it made no
difference, for reasons unknown to me.
I thought, I would be able to help you out here, but I failed ;) So, I guess
it's up for you to wait for a wizard to answer or take the easy way and put
that index.php in another directory to avoid the infinit loop.
Btw, as long as the /ral/ directory exist, you don't have to make the slash
optional, as apache will take care of the redirection for that first.

Regards,
Robert Andersson


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message