Answer the question
In order to leave comments, you need to log in
Why does the redirect not work in a block?
DirectoryIndex index.php
AddDefaultCharset UTF-8
Options -Indexes
Options FollowSymLinks
php_flag magic_quotes_gpc off
php_flag register_globals off
# Добавление слеша в конце пути
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} /+[^\.]+$
RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L]
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /content.php?PATH=/$1 [L,QSA]
</IfModule>
Answer the question
In order to leave comments, you need to log in
DirectoryIndex index.php
AddDefaultCharset UTF-8
Options -Indexes
Options FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /content.php?PATH=/$1 [L, QSA]
php_flag magic_quotes_gpc off
php_flag register_globals off
# Add trailing slash
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} /+[^\.]+$
RewriteRule ^(.+[ ^/])$ %{REQUEST_URI}/ [R=301,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question