Reputation: 387
I have a wordpress site with the following .htaccess
file:
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
However, it will show 200 OK
response (with showing the "Media Library" page in wordpress) with the following url:
http://localhost/wp-admin/upload.php/user-new.php/66868
It's intepreting upload.php
file which exist, but the ideal response should be 404 where /user-new.php/66868
does not exist
Any idea on this ?
Upvotes: 0
Views: 32
Reputation: 96382
This is the effect of the “path info” feature.
Apache realizes that /wp-admin/upload.php
exists as a physical file, so it serves up that, and passes the rest of the requested URL on in the PATH_INFO
environment variable.
AcceptPathInfo
is the name of the directive you can use to turn this off.
Upvotes: 1