Сделал на сайте чпу через .htaccess
PHP:
скопировать код в буфер обмена
AddDefaultCharset UTF-8 RewriteEngine on RewriteRule ^(.*).html$ index.php?alias=$1 [QSA,L] RewriteCond %{THE_REQUEST} ^.*/index.php RewriteRule ^(.*)index.php$ http://%{HTTP_HOST}/$1 [R=301,L] RewriteCond %{HTTP_HOST} ^www\.(.*) RewriteRule ^(.*) http://%{HTTP_HOST}/$1 [L,R=301]
и адреса стали вида: http://sait[dot]ru/stranica[dot]html
но если добавить к этому адресу www
http://www[dot]sait[dot]ru/stranica[dot]html
получается
http://sait[dot]ru/?alias=stranica
как исправить, что бы с http://www[dot]sait[dot]ru/stranica[dot]html переадресовывалось на http://sait[dot]ru/stranica[dot]html
|