G
G
Gennady2019-09-26 14:04:42
MODX
Gennady, 2019-09-26 14:04:42

MODX REVO how to remove /404 redirect from non-existent pages?

Now opening site.com/sdfsdfsdf redirects to site.com/404/ and displays error_page.
How to remove this redirect and leave the URL the same ( /sdfsdfsdf ) but still display the error_page template.
I did not find any rules in .htaccess:
RewriteEngine On
RewriteBase /

# http -> https
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteCond %{REQUEST_URI} !^/robots.txt$
RewriteCond %{REQUEST_URI} !^/r.php
RewriteRule .* https://domain.ru%{REQUEST_URI} [R=301,L]

# Rewrite www.domain.com -> domain.com -- used with SEO Strict URLs plugin
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^domain\.ru [NC]
RewriteRule (.*) https://domain.ru/$1 [R=301,L]

RewriteCond %{REQUEST_URI} ^/robots.txt$
RewriteRule ^(.*)$ r.php [L,QSA]

# The Friendly URLs part
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

The correct resource ID error_page is specified in the system settings of the site

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2019-09-26
@theblackpost

Are there any plugins that can handle this behavior?
Redirector, AutoRedirector, etc.?
UPD: the problem turned out to be in a self-written plugin that implemented a redirect from a URL without a slash at the end to a URL with a slash.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question