Добрый день!
Не могу решить проблему - может вы посоветуете. Когда то давно все работало, а недавно посмотрел сейчас как то криво.
Дело в том- что на сайте , через htaccess должны склеиваться разные версии сайтов (с www и без)
но склеиваются они как то не корректно http://st-clean.ru/uslugi/kompleks/ это нормальная версия (как должно быть). соответственно стоит редирект 301 с http://www.st-clean.ru/uslugi/kompleks/, а открывается почему то http://st-clean.ru///kompleks/ (такой страницы нет)
Я не пойму в чем дело? может кто подскажет?
та же проблема касается всех внутренних страниц.
это собственно сам htaccess - может что не так делаю? Уже 3 день копаюсь.
# Fix HTTPS from FastVPS
SetEnvIf X-Forwarded-Proto https HTTPS=on
RewriteEngine On
ErrorDocument 403 "Access Denied"
ErrorDocument 404 "Page Not Found"
php_flag magic_quotes_gpc on
php_flag register_globals off
php_flag allow_url_include off
php_flag safe_mode on
php_flag expose_php off
php_flag display_errors Off
#php_value open_basedir /home/....
# No Signature
ServerSignature Off
# Enable mod rewrite
RewriteEngine On
IndexIgnore *
Options -Indexes
########## Begin - File execution order, by Komra.de
DirectoryIndex index.php index.html
########## Begin - Rewrite rules to block out some common exploits
# If the request query string contains /proc/self/environ (by SigSiu.net)
RewriteCond %{QUERY_STRING} proc/self/environ [OR]
# Block out any script trying to base64_encode or base64_decode data within the URL
RewriteCond %{QUERY_STRING} base64_(en|de)code[^(]*\([^)]*\) [OR]
## IMPORTANT: If the above line throws an HTTP 500 error, replace it with these 2 lines:
# RewriteCond %{QUERY_STRING} base64_encode\(.*\) [OR]
# RewriteCond %{QUERY_STRING} base64_decode\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root homepage
RewriteRule .* index.php [F]
#
########## End - Rewrite rules to block out some common exploits
########## Begin - File injection protection, by SigSiu.net
RewriteCond %{REQUEST_METHOD} GET
# to put some exceptions
#RewriteCond %{QUERY_STRING} ![a-zA-Z0-9_]=http://yoursite\.ru/
RewriteCond %{QUERY_STRING} [a-zA-Z0-9_]=http:// [OR]
RewriteCond %{QUERY_STRING} [a-zA-Z0-9_]=https:// [OR]
RewriteCond %{QUERY_STRING} [a-zA-Z0-9_]=ftp:// [OR]
RewriteCond %{QUERY_STRING} [a-zA-Z0-9_]=(\.\.//?)+ [OR]
RewriteCond %{QUERY_STRING} [a-zA-Z0-9_]=/([a-z0-9_.]//?)+ [NC]
# CustomLog insert-path-and-name-of-log common env=bad-range
RewriteRule .* - [F]
########## Begin - Basic antispam Filter, by SigSiu.net
## This code will NOT work with Apache 1.x servers.
########## Begin - Advanced server protection - query strings, referrer and config
## Disallow PHP Easter Eggs (can be used in fingerprinting attacks to determine
## your PHP version). See http://www.0php.com/php_easter_egg.php and
## http://osvdb.org/12184 for more information
RewriteCond %{QUERY_STRING} \=PHP[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} [NC]
RewriteCond %{QUERY_STRING} ^(%2d|-)[^=]+$ [NC]
RewriteCond %{QUERY_STRING} ^(%2d|\-)[^=]+$ [NC]
RewriteRule .* - [F]
## SQLi first line of defense, thanks to Radek Suski (SigSiu.net) @
## http://www.sigsiu.net/presentations/fortifying_your_joomla_website.html
## May cause problems on legitimate requests
RewriteCond %{QUERY_STRING} concat[^\(]*\( [NC,OR]
RewriteCond %{QUERY_STRING} union([^s]*s)+elect [NC,OR]
RewriteCond %{QUERY_STRING} union([^a]*a)+ll([^s]*s)+elect [NC]
# CustomLog insert-path-and-name-of-log common env=bad-range
RewriteRule .* - [F]
#### More
RewriteCond %{REQUEST_METHOD} ^(HEAD|TRACE|DELETE|TRACK) [NC,OR]
RewriteCond %{THE_REQUEST} (\\r|\\n|%0A|%0D) [NC,OR]
# drop Range header when more than 5 ranges.
#SetEnvIf Range (,.*?){5,} bad-range=1
#RequestHeader unset Range env=bad-range
# CustomLog insert-path-and-name-of-log common env=bad-range
# XSS Protection
#Header set X-Frame-Options DENY
#Header set X-XSS-Protection "1; mode=block"
#Header set X-Content-Security-Policy "allow 'self';"
#Header set X-Content-Type-Options "nosniff"
# multiple file types
<FilesMatch "\.(htaccess|htpasswd|ini|phps|fla|psd|log|sh|sql|inc)$">
Order Allow,Deny
Deny from all
</FilesMatch>
################################################################ END ##########################################################################
Options +FollowSymlinks
RewriteEngine On
AddDefaultCharset utf-8
<IfModule mod_php4.c>
php_flag magic_quotes_gpc off
php_flag magic_quotes_runtime off
php_flag register_globals off
</IfModule>
<IfModule mod_php5.c>
php_flag magic_quotes_gpc off
php_flag magic_quotes_runtime off
php_flag register_globals off
</IfModule>
# кеширование в браузере на стороне пользовател¤
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access 7 days"
ExpiresByType application/javascript "access plus 1 year"
ExpiresByType text/javascript "access plus 1 year"
ExpiresByType text/css "access plus 1 year"
ExpiresByType text/html "access plus 7 day"
ExpiresByType text/x-javascript "access 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/x-icon "access 1 year"
ExpiresByType application/x-shockwave-flash "access 1 year"
</IfModule>
# ¬ключаем кэш в браузерах посетителей
<ifModule mod_headers.c>
# ¬се html и htm файлы будут хранитьс¤ в кэше браузера один день
<FilesMatch "\.(html|htm)$">
Header set Cache-Control "max-age=43200"
</FilesMatch>
# ¬се css, javascript и текстовые файлы будут хранитьс¤ в кэше браузера одну неделю
<FilesMatch "\.(js|css|txt)$">
Header set Cache-Control "max-age=604800"
</FilesMatch>
# ¬се флэш файлы и изображени¤ будут хранитьс¤ в кэше браузера один мес¤ц
<FilesMatch "\.(flv|swf|ico|gif|jpg|jpeg|png)$">
Header set Cache-Control "max-age=2592000"
</FilesMatch>
# ќтключаем кеширование php и других служебных файлов
<FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$">
Header unset Cache-Control
</FilesMatch>
</IfModule>