Re: Using THE_REQUEST with rewrites

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

On 1/11/25 3:36 PM, Eric Covener wrote:
>> 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:/?
> MergeSlashes defaults to "on".

I've added the following to my vhost config:

MergeSlashes off

but it doesn't make a difference. What could I be doing wrong? This is 
apache-2.4.69 on fedora40.

https://httpd.apache.org/docs/2.4/mod/core.html#mergeslashes

This works:

RewriteCond %{THE_REQUEST}   "GET /http:/(.*) HTTP/1.1"
RewriteRule ^ https://%1 [L,R=301,NE]

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.