httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg" <g...@textor.com>
Subject [users@httpd] Redirection trick with querystrings
Date Thu, 08 Jan 2004 12:42:24 GMT

Hi,

This may be a tricky one...I'm trying to use either RewriteEngine/Rewrite or
RedirectMatch (whatever works) to do the following:

When a URL of the form

http://myserver.com/scripts/redir.pl?a/index.html

arrives, I want the output to be

http://myserver.com/a/index.html



There's a small mixup with the 'scripts' in the path, but I've solved it and
it's not
related to my problem. The problem: As you can see, I want to 'capture' the
querystring and make it part of the output URL. (Yes, I want to get rid of
the script, the site will run statically) Is this possible? Do either
RewriteXXX or RedirectMatch support
something like that, separating the querystring and enable me to use them as
just
strings to be attached?

For example, when I use

RewriteRule redir\.pl?(.*) http://myserver.com/$1

I get

http://myserver.com/?g/index.htm

which means the querystring has been picked up as querystring and the
questionmark is still there. Now, the only thing I want is to get rid of
that questionmark, so the URL would be

http://myserver.com/g/index.htm


Any ideas? Is this possible?

Thanks in advance,
Greg




------------------------------------------
Greg Dimitriadis
Textor Webmasters
Tel: +44 20 8400 9362
Fax: +44 20 8742 0010




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