httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bobb, Kirth Andre (US - Arlington)" <>
Subject [users@httpd] mod_rewrite question
Date Fri, 30 Mar 2012 17:33:20 GMT
I’m attempting to replace all the spaces with ‘%20’ when URLs are passed via a proxy.
 I have the following Rewrite Rule added to my httpd.conf on the Apache 2 Proxy server I’m

RewriteEngine on
RewriteLogLevel 5
RewriteLog logs/rewrite_logs.log
RewriteRule ^/(.+)\ (.+)$ /$1\%20$2 [R, NE]

But for some reason when I look at the rewrite logs I see that the spaces are only being replaced
at the very last occurrence of a space. So for example. Let’ say I start with

www.some<http://www.some> website that has

In the logs I see the following:

www.some<http://www.some> website that

Notice it didn’t add the %20 between the first 3 spaces but it did on the 4th/last space.

This only happens after I added the NE flag, and I added this so that %20 doesn’t get encoded
to %2520.

Any thoughts?

This message (including any attachments) contains confidential information intended for a
specific individual and purpose, and is protected by law. If you are not the intended recipient,
you should delete this message.

Any disclosure, copying, or distribution of this message, or the taking of any action based
on it, is strictly prohibited.


View raw message