M
M
melbr2019-09-19 13:08:17
1C-Bitrix
melbr, 2019-09-19 13:08:17

Why does 301 redirect not work on the site (Bitrix)?

Good afternoon.
I can't figure out why the redirects on the site don't work.
Part of htaccess file

Options -Indexes 
ErrorDocument 404 /404.php

<IfModule mod_php5.c>
  php_flag session.use_trans_sid off
  #php_value display_errors 1
  #php_value mbstring.internal_encoding UTF-8
</IfModule>

<IfModule mod_rewrite.c>
  Options +FollowSymLinks
  RewriteEngine On
  
  RedirectMatch 404 /\.git
  RedirectMatch 404 /\.idea
    #RedirectMatch 404 /*\.txt

    RewriteCond %{HTTPS} off
    RewriteCond %{HTTP:X-Forwarded-Proto} !https
    RewriteCond %{HTTP_HOST} !develop.site.ru
    RewriteCond %{HTTP_HOST} !site.loc
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    RewriteCond %{HTTP_HOST} ^www.site\.ru$ [NC]
    RewriteRule ^(.*)$ https://site.ru/$1 [R=301,L]

    RewriteCond %{HTTP_HOST} ^xn----12dq\.xn--p1ai$ [NC]
    RewriteRule ^(.*)$ https://site.ru/$1 [R=301,L]

    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
    RewriteRule ^index\.php$ https://site.ru/ [R=301,L] 
     
  Redirect	301	https://site.ru/catalog/600-lit600l/	https://site.ru/catalog/kompostery-dlya-/
  			
  Redirect	301	/catalog/aksey/gavyy/	https://site.ru/catalog/tuovye_ball/
  		
  Redirect	301	^/catalog/balili/venti/$	https://site.ru/catalog/ballonnzov/
  
  
  RewriteCond %{QUERY_STRING} ^catalog/bochki/bocl/$ 
  RewriteRule ^(.*)$  https://site.ru/catalog/bocl/? [R=301,L]
  
    RewriteRule ^catalog/(.+)/ooo-rossiya/.*$ https://site.ru/catalog/$1/noya/$2 [R=301,L]
    RewriteRule ^catalog/(.+)/rusinkossiya-/.*$ https://site.ru/catalog/$1/rusa/$2 [R=301,L]
    RewriteRule ^stati/brazhechkakh/.*$ https://site.ru/stati/$1 [R=301,L]
   ...

What could be the reason?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yaroslav Alexandrov, 2019-09-19
@alexyarik

Bitrix has to do with it if the server processes htaccess
https://www.1c-bitrix.ru/download/scripts/bitrix_s...

You can test the hosting for compliance with the technical requirements of the product using a special script: bitrix_server_test.php. Upload it to the hosting, then open it in the browser and click the "Start Testing" button

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question