Суть такова - к странице можно обратиться как site.ru/stranica.html
также можно обратиться
site.ru/stranica/
Хотелось бы исправить на единое обращение *.html
а без html - сделать редирект на html
В config.php у меня стоит
Code: Select all
$config['page_extension'] = '.html';
Code: Select all
Options -Indexes
<Files "config.php">
order allow,deny
deny from all
</Files>
ErrorDocument 403 /forbidden403.shtml
ServerSignature Off
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.сайт\.ru$ [NC]
RewriteRule ^(.*)$ http://сайт.ru/$1 [R=301,L]
# URL Filtering helps stop some hack attempts
#IF the URI contains a "http:"
RewriteCond %{QUERY_STRING} http\: [OR]
#OR if the URI contains a "["
RewriteCond %{QUERY_STRING} \[ [OR]
#OR if the URI contains a "]"
RewriteCond %{QUERY_STRING} \] [OR]
#OR if the URI contains a "<__script__>"
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
#OR script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
#OR any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule ^.*$ - [F,L]
# END Filtering
# CMSMS Rewriting
# Set assume mod_rewrite to true in config.php and clear CMSMS cache
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]