Using THE_REQUEST with rewrites

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

 



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




[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