Using THE_REQUEST with rewrites

Dave Wreski <[email protected]>
Newsgroups gmane.comp.apache.user
Organization Guardian Digital, Inc.
Message-ID <[email protected]>
Hi,

We need to construct a rewriterule that fixes problems like:

https://linuxsecurity.com/https://example.com/123/

I'd like to just redirect it to https://example.com/123

except the log entry looks like this:

68.195.111.42 - - [11/Jan/2025:15:10:39 -0500] "GET 
/http:/example.com/123/ HTTP/1.1" 404 196 r:"-" "Mozilla"

Where did the other slash go after the http:/?

I've tried a rewriterule like:

RewriteCond %{THE_REQUEST}   ^GET\ /http://(.*)

RewriteRule ^ %1 [L,R=301]

I think there is something else involved here that I don't understand. 
Tracing the above URL looks like the slash is being stripped well before 
any rewriterules are involved.

dave
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.