I am setting 404 (400.php) and 400 (400.php) pages.
Website is https://www.rsseosolution.com
If i am typing https://www.rsseosolution.com/sdfsdfsdfsadfsda its working fine and showing 404.php page
But if i am trying to check any not existing php file like https://www.rsseosolution.com/monthly-link-building-campaign.php then its showing normal "File not found." message not redirecting to 404.php.
And for 400 error its showing normal server "Bad Request Error" While i want to show my custom 400.php.
Htaccess is as below
Options +FollowSymLinks
RewriteEngine on
# ensure www.
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# ensure https
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteRule seo-package-(.*)-n-(.*)\.php$ seo-package-detail.php?id=$1&name=$2 [L]
RewriteRule case-studies/(.*)-(.*)\.php$ case-studies.php?project=$1&id=$2 [L]
RewriteRule tutorial/(.*)-(.*)\.php$ tutorial.php?topic=$1&id=$2 [L]
RewriteRule blog-page-(.*)\.php$ blog.php?page=$1 [L]
RewriteRule seo-tutorial-(.*)\.php$ seo-tutorial.php?page=$1 [L]
RewriteRule frequently-ask-question-faq-(.*)\.php$ frequently-ask-question-faq.php?page=$1 [L]
ErrorDocument 404 /404.php
ErrorDocument 400 /400.php
One more thing if i am adding [L] with 404.php and 400.php then server is giving "Internal Server Error" for complete site.
I want to redirect all URL (Page, blog and any other mistyping url) go to 404.php.
For bad request Error like https://www.rsseosolution.com/search/save%2050%%20seo%20budget should go to 400.php ....... Both pages are already on site and working fine if type manually page name.
Please guide me.