не корректна переадресация

#
не корректна переадресация
Добрый день!
Не могу решить проблему - может вы посоветуете. Когда то давно все работало, а недавно посмотрел сейчас как то криво.
Дело в том- что на сайте , через 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 - Common hacking tools and bandwidth hoggers block
SetEnvIf user-agent "Indy Library" stayout=1
#SetEnvIf user-agent "Wget" stayout=1
SetEnvIf user-agent "libwww-perl" stayout=1
SetEnvIf user-agent "Download Demon" stayout=1
SetEnvIf user-agent "GetRight" stayout=1
SetEnvIf user-agent "GetWeb!" stayout=1
SetEnvIf user-agent "Go!Zilla" stayout=1
SetEnvIf user-agent "Go-Ahead-Got-It" stayout=1
SetEnvIf user-agent "GrabNet" stayout=1
SetEnvIf user-agent "TurnitinBot" stayout=1

deny from env=stayout

########## 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.

# RewriteCond %{QUERY_STRING} \b(ambien|blue\spill|cialis|cocaine|ejaculation|erectile)\b [NC,OR]
# RewriteCond %{QUERY_STRING} \b(erections|hoodia|huronriveracres|impotence|levitra|libido)\b [NC,OR]
# RewriteCond %{QUERY_STRING} \b(lipitor|phentermin|pro[sz]ac|sandyauer|tramadol|troyhamby)\b [NC,OR]
# RewriteCond %{QUERY_STRING} \b(ultram|unicauca|valium|viagra|vicodin|xanax|ypxaieo)\b [NC]

# RewriteRule .* - [F]

########## 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]

RewriteCond %{HTTP_REFERER} (<|>|Т|%0A|%0D|%27|%3C|%3E|%00) [NC,OR]
RewriteCond %{HTTP_COOKIE} (<|>|Т|%0A|%0D|%27|%3C|%3E|%00) [NC,OR]

RewriteCond %{HTTP_USER_AGENT} ^$ [OR]
RewriteCond %{HTTP_USER_AGENT} ^(java|curl|wget) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (winhttp|HTTrack|clshttp|archiver|loader|email|harvest|extract|grab|miner) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (libwww-perl|curl|wget|python|nikto|scan) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (<|>|Т|%0A|%0D|%27|%3C|%3E|%00) [NC,OR]

RewriteCond %{QUERY_STRING} proc\/self\/environ [NC,OR]
RewriteCond %{QUERY_STRING} etc\/passwd [NC,OR]

#Block mySQL injects
RewriteCond %{QUERY_STRING} (;|<|>|Т|Ф|\)|%0A|%0D|%22|%27|%3C|%3E|%00).*(/\*|information_schema|union|delete|select|insert|cast|set|concat_ws|file_priv|load_file|aes_decrypt|unhex|aes_encrypt|declare|drop|update|md5|benchmark) [NC,OR]
RewriteCond %{QUERY_STRING} \.\./\.\. [OR]
RewriteCond %{QUERY_STRING} (localhost|loopback|127\.0\.0\.1) [NC,OR]
RewriteCond %{QUERY_STRING} (<|>|Т|%0A|%0D|%27|%3C|%3E|%00) [NC]
# CustomLog insert-path-and-name-of-log common env=bad-range
RewriteRule .* - [F]

# 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_dir.c>
   DirectoryIndex index.php index.htm index.html
</IfModule>

<IfModule mod_rewrite.c>
   RewriteEngine On
   RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /


RewriteRule ^index\.(php|html)$ / [R=301,L]
RewriteCond %{HTTP_HOST} ^www.st-clean\.ru$ [NC]
RewriteRule ^(.*)$ http://st-clean.ru/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^www.langooy\.ru$ [NC]
RewriteRule ^(.*)$ http://langooy.ru/$1 [R=301,L]



   
</IfModule>

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^(.+)/$
RewriteRule ^(.+)/$ /$1 [R=301,L]


# кеширование в браузере на стороне пользовател¤
<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>






#Включение gzip-сжатия
AddEncoding gzip .gz
RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{REQUEST_FILENAME}.gz -f
RewriteRule ^(.*)$ $1.gz [QSA,L]

<IfModule mod_headers.c>
Header append Vary User-Agent
<FilesMatch .*.js.gz$>
ForceType text/javascript
Header set Content-Encoding: gzip
Header set Cache-control: private
</FilesMatch>
<FilesMatch .*.css.gz$>
ForceType text/css
Header set Content-Encoding: gzip
Header set Cache-control: private
</FilesMatch>
</IfModule>

Модератор
#
Re: не корректна переадресация
Возьмите модуль редиректов и не забивайте себе голову проблемами: http://www.hostcms.ru/shop/market/modules/seo/hostcms_redirect/
#
Re: не корректна переадресация
у меня 5 версия. модуль там пойдет?
Модератор
#
Re: не корректна переадресация
langooy,
для пятой версии модуль не подойдет
#
Re: не корректна переадресация
может тогда так посмотрите? если не сложно? может что увидите
Авторизация