Отключить https для поддомена

J2
На сайте с 13.12.2011
Offline
46
1150

Здравствуйте. Есть сайт https://mallinru.ru/ и есть его мобильная версия http://m.mallinru.ru/ папка распложена в корневой лерриктории mallinru.ru/m

Помогите настроить .htaccess так что бы при обращении mallinru.ru/m открывалось m.mallinru.ru

и при обращении https://m.mallinru.ru/ открывалось http://m.mallinru.ru/

Я не силен в настройке этого файла и сутки искал в google но все бестолку поэтому пишу здесь.

Причина в том что я пытаюсь подгрузить 2 файла

<script src="http://m.mallinru.ru/data/front-create/Base64.js" crossorigin="use-credentials"></script>

<script async="true" src="http://m.mallinru.ru/data/front-create/2d9de06cbb2aed88421f3ef32be10125.js"></script>

И браузер ругается на протокол как это обойти?

Сейчас .htaccess по адресу mallinru.ru такой:


ErrorDocument 404 https://mallinru.ru/404.html
AddDefaultCharset UTF-8

<ifModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/css text/javascript application/javascript application/x-javascript
</ifModule>

<IfModule mod_rewrite.c>
RewriteEngine on
Options +FollowSymLinks
RewriteBase /
#Склейка www.домен.ру с домен.ру
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*) https://%1/$1 [L,R=301]

RewriteCond %{HTTP_HOST} ^mallinru\.ru$
RewriteRule ^sitemap\.xml$ /data/sitemap/sitemap-index.xml [L]

RewriteCond %{HTTP_HOST} ^mallinru\.ru$
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*) https://%{SERVER_NAME}/$1 [L,R=301]

RewriteCond %{HTTP_HOST} ^m\.mallinru\.ru$
RewriteCond %{REQUEST_URI} !/m/
RewriteRule ^(.*)$ /m/$1 [L]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]
</IfModule>

А в m.mallinru.ru такой:


<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^m.mallinru.ru
RewriteRule ^index\.html$ http://m.mallinru.ru/ [R=301,L]
</IfModule>

Помогите пожалуйста что нужно изменить и поможет ли это без проблем подключить 2 файла js

https://mallinru.ru/ (https://mallinru.ru/)

Авторизуйтесь или зарегистрируйтесь, чтобы оставить комментарий