homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

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)

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)

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

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved