RewriteCond %{HTTP_HOST} ^subdomain2\.main-site\.ru$ [NC]
RewriteRule ^$ http://subdomain.main-site.ru/some-url [R=301,L]
RewriteCond %{HTTP_HOST} ^subdomain2\.main-site\.ru$ [NC]
RewriteRule ^$ http://subdomain.main-site.ru/some-url [P]
Только что попробовали: оказывается если включить php в режиме модуля, то авторизация проходит, а если как CGI то не работает
CGIPassAuth on
RewriteCond %{REQUEST_URI} ^/katalog/categoriya/podcategoriya1/ RewriteRule ^.*$ https://site.ru/katalog/categoriya/podcategoriya2/ [R=301,L]
RewriteCond %{REQUEST_URI} ^/katalog/categoriya/podcategoriya1/(.*)
RewriteRule ^.*$ https://site.ru/katalog/categoriya/podcategoriya2/%1 [R=301,L]
RewriteRule ^ticket\.png$ /ticket.php [R=301,L]
RewriteRule ^ticket\.png$ /ticket.php [L]
RewriteCond %{HTTP_HOST}%{REQUEST_URI} ^(?>www\.|)([^.]+)\.mytopsto\.ru(/.+|) [NC]
RewriteRule ^ https://mytopsto.ru/%1%2 [R=301,L]
RewriteCond %{QUERY_STRING} (^|&)PAGEN_1=1($|&)
RewriteCond %{QUERY_STRING} (^|&)SIZEN_1=50($|&)
RewriteRule ^(.*)$ /$1? [R=301,L]
RewriteCond %{HTTP_HOST} ^cityname\.domain\.com$ [NC]
RewriteRule ^news/category/(\d+)$ /news/category-new/$1 [R=301,L]
<LimitExcept POST>
deny from all
</LimitExcept>
RewriteCond %{QUERY_STRING} !^$
RewriteCond %{QUERY_STRING} !(^|&)srp=
RewriteCond %{QUERY_STRING} !(^|&)srk=
RewriteRule ^(.+?)\.html$ https://%{HTTP_HOST}/$1.html? [L,R=301]
RewriteRule ^(.+?)\.html(?!/amp/).+$ https://%{HTTP_HOST}/$1.html? [L,R=301]
RewriteCond $2 ^(?!/amp/).+ [OR]
RewriteCond &%{QUERY_STRING} ^(?!.*&srp=)(?!.*&srk=)&.+
RewriteRule ^(.+?)\.html(.*)$ https://%{HTTP_HOST}/$1.html? [L,R=301]
RewriteCond %{REQUEST_URI} ^/catalog/perchatki/$1 RewriteRule ^(.*)$ /catalog/ekipirovka/perchatki/$1 [R=301,L]
RewriteCond %{REQUEST_URI} ^/catalog/perchatki/(.*)
RewriteRule ^(.*)$ /catalog/ekipirovka/perchatki/%1 [R=301,L]
RewriteRule ^(catalog)/(perchatki/.*)$ /$1/ekipirovka/$2 [R=301,L]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{THE_REQUEST} "^GET /CMS/ "
RewriteRule ^ / [R=301,L]
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* /CMS/index.php [L]
</IfModule>
# Переезд на https
RewriteCond %{SERVER_PORT} !^443$
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
# Убираем www
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
RewriteCond %{SERVER_PORT} !^443$ [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteRule ^(.*)$ https://site.ru/$1 [R=301,L]
RewriteCond %{QUERY_STRING} (?:^|&)(id=\d+)
RewriteRule ^catalog\.php$ http://site.ru/%1? [L,R=301]
RewriteRule ^uploads/(.+)$ https://site.ru/uploads/$1 [QSA]
RewriteRule ^(uploads/.+)$ https://site.ru/$1 [R=301,L]
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^page-cache/(.*?)(\.html|$) http://site.com/$1 [R=301,L]
RewriteRule ^$ page-cache/pc__index__pc.html [L]
RewriteCond %{DOCUMENT_ROOT}/page-cache/$1.html -f
RewriteRule (.+) page-cache/$1.html [L]