Reputation: 33
I have created a folder in my localhost named "example".and I have added 4 files inside that folder.
when I type the url http://www.localhost/example/123 (working fine) It is going to 404 error page.
when I type the url http://www.localhost/example/index.php/123 it is not redirecting to 404 page. the same happening FOR about.php and other php extension files in the example folder.
In my htaccess file I have re-directicted the non existing file ro 404 pages.But is not happening for the index.php,about.php..and all the files with php extension in the example folder.
the following is my current .htaccess file.
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
ErrorDocument 404 /404.php
Upvotes: 3
Views: 2451
Reputation: 799250
If you want to explicitly disable path info then you must use the AcceptPathInfo
directive.
AcceptPathInfo Off
Upvotes: 1