Answer the question
In order to leave comments, you need to log in
Why does 404 redirect not work in all cases?
Hello! There is a site on WordPress: site.com.ua, if you add a slash and an erroneous text at the end, it will display a 404 page, but if you go deeper into the site, for example: site.com.ua/testpage/ and after the slash, write the erroneous text again , it displays another page, namely, for some reason, the block page, but not the page with a 404 response. Are there any conditions for the .htacces file to translate non-existent pages to a page with a 404 response?
My .htacces is currently:
# BEGIN LSCACHE
# END LSCACHE
# BEGIN NON_LSCACHE
# END NON_LSCACHE
#RewriteEngine On
#RewriteCond %{HTTPS} =off
#RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI } [QSA ,L]
Rewrite Engine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI } [L,R=301]
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [ L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
# BEGIN LiteSpeed
SetEnv noabort 1
# END LiteSpeed
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question