Answer the question
In order to leave comments, you need to log in
What is the correct way to write this in .htaccess?
There are 2 different directories with different .htaccess files in each:
.htaccess #1:
# BEGIN [SEO_REDIRECTION]
ErrorDocument 404 /index.php?error=404
# END [SEO_REDIRECTION]
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(redirect\.php)
RewriteRule ^(.*)$ redirect.php?l=$1 [L]
Answer the question
In order to leave comments, you need to log in
The problem was solved by changing the type of links in Wordpress.
After that, the engine itself changed its .htaccess:
# BEGIN [SEO_REDIRECTION]
ErrorDocument 404 /index.php?error=404
# END [SEO_REDIRECTION]
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(redirect\.php)
RewriteRule ^(.*)$ redirect.php?l=$1
# BEGIN WordPress
# END WordPress
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question