Mobile app version of vmapp.org
Login or Join
Harper822

: 404 working only with wrong extension My 404 .htaccess works very well when I put a wrong extension at it in place of .php. Unfortunately the 404 does not work when I put a wrong name with

@Harper822

Posted in: #Apache #Php

My 404 .htaccess works very well when I put a wrong extension at it in place of .php.

Unfortunately the 404 does not work when I put a wrong name with .php.

This is my .htaccess code:

<Files ~ "^.(htaccess|htpasswd)$">
deny from all
</Files>
Options -Indexes
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www..* [NC]
RewriteRule ^(.*) www.%{HTTP_HOST}/ [R=301]

ErrorDocument 404 /404/notfound.html
order deny,allow

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Harper822

1 Comments

Sorted by latest first Latest Oldest Best

 

@Odierno851

This is probably because all PHP requests are being sent to the PHP interpreter. I have seen this before on certain setups, normally with optimized PHP, specially configured FastCGI, etc.

What hosting platform are you on? Is it a linux host? You mention Apache. Do you have control over the server? What does php.ini look like?

Are you still having this issue? The links in your post look the same to me.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme