Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Rewriting query string w/ mod_rewrite



4:01 am on Mar 9, 2001 (gmt 0)

I'm trying to rewrite /abc/xyz?JservID=foo%2ebar to /abc/xyz?JservID=foo.bar

I tried various stunts and to no avail. Some things (among others) I tried:

RewriteRule ^(/abc/xyz)\?(.*)%2e(.*)$ ^$1\?$2\.$3$

No good - mod_rewrite sees just the URI portion (i.e /foo/bar) and pretends the query string simply doesn't exist.

In a nutshell I can see no way to rewrite a query string using mod_rewrite.

Any suggestion ?

Thanks in advance


4:47 am on Mar 9, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

The format for a RewriteRule is "Regular expression" followed by the target destination for example:
^mydomain yourdomain.com

It looks to me as if your regex needs refining and your destination needs to be a destination, not a regex. You may find this [brainstorm.co.uk] helpful.


5:16 am on Mar 9, 2001 (gmt 0)

Thanks Dave - I totally agree - that was a desperate half-measure I tried. But then, this other rule give me no joy either:

RewriteRule ^(.*)\?(.*)$ $1?{unescape:$2}

(hoping that %2e would get converted to the '.' character)

Any suggestions ?



3:47 am on Mar 10, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

Take a look at [engelschall.com...]
I think this is what you may need to do.

Featured Threads

Hot Threads This Week

Hot Threads This Month