mod_rewrite question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

 

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 website that has info.com

 

In the logs I see the following:

 

www.some website that has%20info.com

 

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.

v.E.1


 

 

 


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux