L
L
LordDimka2019-01-17 15:16:28
htaccess
LordDimka, 2019-01-17 15:16:28

How to redirect the site, except for some pages?

How to redirect a site, except for some pages?
here is the config
AddDefaultCharset utf-8
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/api/ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ api.php [QSA,L]
# SEO
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ (.*[^/])$ /$1/ [L,R=301]
# if directory or file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise send request to index.php
RewriteRule file. index.php
RewriteCond %{THE_REQUEST} ^[AZ]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ / [R=301,L]
RewriteCond %{REQUEST_URI} !^/documents/
RewriteRule ^(.*) https://test.ru/nyj [R=301,L]

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question