Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Users

mod_rewrite question

 

 

Apache users RSS feed   Index | Next | Previous | View Threaded


kbobb at deloitte

Mar 30, 2012, 10:33 AM

Post #1 of 1 (198 views)
Permalink
mod_rewrite question

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<http://www.some> website that has info.com

In the logs I see the following:

www.some<http://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

Apache users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.