Mailing List Archive

[Bug 66794] New: Requesting a non-existent subdirectory is not rewritten correctly.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66794

Bug ID: 66794
Summary: Requesting a non-existent subdirectory is not
rewritten correctly.
Product: Apache httpd-2
Version: 2.4.53
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: mod_rewrite
Assignee: bugs@httpd.apache.org
Reporter: bug@abten.net
Target Milestone: ---

Requesting http://www.example.net/test.html will display the contents of
/var/www/html/test.html.
Requesting http://www.example.net/test2 will display the contents of
/var/www/html/test.html.

When I request http://www.example.net/test/test, I get 404 Not Found
instead....

-----------------------------------------------------------------------

<VirtualHost *:80>
ServerName www.example.net
DocumentRoot /var/www/html
<Directory "/var/www/html">
AllowOverride All
Require all granted
Options -Indexes +FollowSymLinks
</Directory>
</VirtualHost>

/var/www/html/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^test\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /test.html [L]
</IfModule>

# httpd -M | grep rewrite
rewrite_module (shared)

-----------------------------------------------------------------------
5.14.0-284.18.1.el9_2.x86_64
Server version: Apache/2.4.53 (AlmaLinux)
Server built: Apr 28 2023 00:00:00
Installed Packages
Name : httpd
Version : 2.4.53
Release : 11.el9_2.5
Architecture : x86_64
Size : 59 k
Source : httpd-2.4.53-11.el9_2.5.src.rpm
Repository : @System
From repo : appstream
Summary : Apache HTTP Server
URL : https://httpd.apache.org/

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org