0 Пользователей и 1 Гость просматривают эту тему.
  • 8 Ответов
  • 1079 Просмотров
*

Acme

  • Осваиваюсь на форуме
  • 34
  • 0 / 0
Всем привет!
Joomla! 2.5., всё никак не получается с http://домена сделать переадресацию на https://поддомен.домен.
Прописывал в индексном файле
   
Код
header("HTTP/1.1 301 Moved Permanently");
header("Location: https://домен/");
 
нет никакого эффекта.
В .htaccess в папке с http://домен прописывал:
Код
#RewriteBase /
RewriteCond %{HTTP_HOST} ^(www.)?les\.rosles5\.(com|ru)$
RewriteCond %{REQUEST_URI} !/les/
RewriteRule ^(.*)$ /les/$1 [L]

RewriteCond %{HTTP_HOST} ^(www.)?drova\.rosles5\.(com|ru)$
RewriteCond %{REQUEST_URI} !/drova/
RewriteRule ^(.*)$ /drova/$1 [L]
Всё ровно при заходе на основной домен не происходит никакой переадресации. Как можно сделать переадресацию?
*

Acme

  • Осваиваюсь на форуме
  • 34
  • 0 / 0
Пробовал так-же
Код
 Redirect / http://example.ru/$1 [R=301,L] 
сразу выдает ошибку на обоих доменах:
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at support@timeweb.ru to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.
*

sword852d

  • Захожу иногда
  • 199
  • 9 / 0
RewriteEngine On
RewriteCond %{HTTPS} OFF
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
RewriteCond %{HTTPS} off
RewriteRule \.(?:jpe?g|gif|png|tiff|css|js)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,NC,R=301]
RewriteEngine On  //--- Это прописать в файле .htaccess в корне который лежит

Заодно и некоторые файлы jpeg|gif|png|tiff|css|js будут перенаправляться!
*

Acme

  • Осваиваюсь на форуме
  • 34
  • 0 / 0
К сожалению, не помогло.
.htaccess выглядит так:
Код
RewriteEngine On

#RewriteBase /
RewriteCond %{HTTP_HOST} ^(www.)?les\.rosles5\.(com|ru)$
RewriteCond %{REQUEST_URI} !/les/
RewriteRule ^(.*)$ /les/$1 [L]

RewriteCond %{HTTP_HOST} ^(www.)?drova\.rosles5\.(com|ru)$
RewriteCond %{REQUEST_URI} !/drova/
RewriteRule ^(.*)$ /drova/$1 [L]
RewriteCond %{HTTPS} OFF
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
RewriteCond %{HTTPS} off
RewriteRule \.(?:jpe?g|gif|png|tiff|css|js)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,NC,R=301]
RewriteEngine On 

Order Allow,Deny
Allow from all
Deny from 208.115.96.0/24
Deny from 208.115.97.0/24
Deny from 208.115.98.0/24
Deny from 208.115.99.0/24
Deny from 208.115.100.0/24
Deny from 208.115.101.0/24
Deny from 208.115.102.0/24
Deny from 208.115.103.0/24
Deny from 208.115.104.0/24
Deny from 208.115.105.0/24
Deny from 208.115.106.0/24
Deny from 208.115.107.0/24
Deny from 208.115.108.0/24
Deny from 208.115.109.0/24
Deny from 208.115.110.0/24
Deny from 208.115.111.0/24
Deny from 208.115.112.0/24
Deny from 208.115.113.0/24
Deny from 208.115.114.0/24
Deny from 208.115.115.0/24
Deny from 208.115.116.0/24
Deny from 208.115.117.0/24
Deny from 208.115.118.0/24
Deny from 208.115.119.0/24
Deny from 208.115.120.0/24
Deny from 208.115.121.0/24
Deny from 208.115.122.0/24
Deny from 208.115.123.0/24
Deny from 208.115.124.0/24
Deny from 208.115.125.0/24
Deny from 208.115.126.0/24
Deny from 208.115.127.0/24
Deny from 208.115.113.
Deny from 208.115.111.
Deny from 208.115.111.68
Deny from 193.105.210.226
Deny from 193.105.210.
Deny from 193.105.
Deny from 213.238.175.71
Deny from 31.184.238.128
Deny from 5.18.228.34
<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresByType application/javascript "access plus 4 weeks"
  ExpiresByType text/javascript "access plus 4 weeks"
  ExpiresByType text/css "access plus 4 weeks"
  ExpiresByType image/gif "access plus 4 weeks"
  ExpiresByType image/jpeg "access plus 4 weeks"
  ExpiresByType image/png "access plus 4 weeks"
</IfModule>
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIE !no-gzip !gzip-only-text/html
<ifmodule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_item_include file \.js$
mod_gzip_item_include file \.css$ </ifmodule>
</IfModule>
AddDefaultCharset utf-8
AddType 'text/html; charset=utf-8' .html .htm .shtml
*

sword852d

  • Захожу иногда
  • 199
  • 9 / 0
В админке в общих настройках, вкладка сервер. Выбрать включить ssl сделано?
*

Acme

  • Осваиваюсь на форуме
  • 34
  • 0 / 0
Не могу найти такую вкладку:
*

Acme

  • Осваиваюсь на форуме
  • 34
  • 0 / 0
Помогло
Код
<?php header("Location: https://новый_домен/"); ?>
*

sword852d

  • Захожу иногда
  • 199
  • 9 / 0
Сори не обратил внимания, у вас версия 2.5 , а я советы под 3-ку писал(((
*

Acme

  • Осваиваюсь на форуме
  • 34
  • 0 / 0
Теперь второй вопрос по переадресации. При заходе на домен http:// перекидывает почему-то на https://сайт/страница
Смотрю файлы .htaccess нигде не виду ошибки. В чем проблема?

Код
RewriteEngine On
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.(php|html|htm)\ HTTP/
RewriteRule ^(.*)index\.(php|html|htm)$ https://drova.rosles5/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^(www.)?les\.rosles5\.(com|ru)$
RewriteCond %{REQUEST_URI} !/les/
RewriteRule ^(.*)$ /les/$1 [L]
RewriteCond %{HTTP_HOST} ^(www.)?drova\.rosles5\.(com|ru)$
RewriteCond %{REQUEST_URI} !/drova/
RewriteRule ^(.*)$ /drova/$1 [L]
RewriteCond %{HTTPS} on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
RewriteCond %{HTTPS} off
RewriteRule \.(?:jpe?g|gif|png|tiff|css|js)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,NC,R=301]
<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresByType application/javascript "access plus 4 weeks"
  ExpiresByType text/javascript "access plus 4 weeks"
  ExpiresByType text/css "access plus 4 weeks"
  ExpiresByType image/gif "access plus 4 weeks"
  ExpiresByType image/jpeg "access plus 4 weeks"
  ExpiresByType image/png "access plus 4 weeks"
</IfModule>
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIE !no-gzip !gzip-only-text/html
<ifmodule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_item_include file \.js$
mod_gzip_item_include file \.css$ </ifmodule>
</IfModule>
AddDefaultCharset utf-8
AddType 'text/html; charset=utf-8' .html .htm .shtml

поддомен:
Код
Options All -ExecCGI -Indexes -Includes +FollowSymLinks
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
<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_headers.c>
<FilesMatch "\.(html|htm)$">
Header set Cache-Control "max-age=43200"
</FilesMatch>
<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>
<FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$">
Header unset Cache-Control
</FilesMatch>
</IfModule>
RewriteCond %{QUERY_STRING} proc/self/environ [OR]
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
RewriteCond %{QUERY_STRING} base64_(en|de)code\(.*\) [OR]
RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule .* index.php [F]
<IfModule mod_rewrite.c>
 RewriteEngine On
 RewriteBase /
 RewriteCond %{THE_REQUEST} !^POST
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteCond %{SERVER_PORT}>s ^(443>(s)|[0-9]+>s)$
RewriteRule ^index\.php$ https%2://drova.rosles5.ru/ [R=301,L]
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
</IfModule>

RewriteEngine On

RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_URI} !^/index\.php
RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L]
<IfModule mod_php5.c>
php_flag display_errors off
php_flag display_startup_errors off
</IfModule>

Redirect 301 /index.php https://drova.rosles5.ru/

Order Allow,Deny
Allow from all
Deny from 208.115.111.68
Deny from 208.115.96.0/24
Deny from 208.115.97.0/24
Deny from 208.115.98.0/24
Deny from 208.115.99.0/24
Deny from 208.115.100.0/24
Deny from 208.115.101.0/24
Deny from 208.115.102.0/24
Deny from 208.115.103.0/24
Deny from 208.115.104.0/24
Deny from 208.115.105.0/24
Deny from 208.115.106.0/24
Deny from 208.115.107.0/24
Deny from 208.115.108.0/24
Deny from 208.115.109.0/24
Deny from 208.115.110.0/24
Deny from 208.115.111.0/24
Deny from 208.115.112.0/24
Deny from 208.115.113.0/24
Deny from 208.115.114.0/24
Deny from 208.115.115.0/24
Deny from 208.115.116.0/24
Deny from 208.115.117.0/24
Deny from 208.115.118.0/24
Deny from 208.115.119.0/24
Deny from 208.115.120.0/24
Deny from 208.115.121.0/24
Deny from 208.115.122.0/24
Deny from 208.115.123.0/24
Deny from 208.115.124.0/24
Deny from 208.115.125.0/24
Deny from 208.115.126.0/24
Deny from 208.115.127.0/24
Deny from 208.115.113.
Deny from 208.115.111.
Deny from 208.115.111.68
Deny from 193.105.210.226
Deny from 193.105.210.
Deny from 193.105.
Deny from 31.184.238.128
Deny from 5.18.228.34
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

Как сделать модуль на полный экран? Подробнее в в теме?

Автор 62411

Ответов: 3
Просмотров: 974
Последний ответ 23.02.2022, 20:35:06
от marksetter
Сделать аналог

Автор pegas-k1

Ответов: 8
Просмотров: 1413
Последний ответ 02.02.2021, 13:56:21
от **vadim**
Миграция на Joomla с другой CMS

Автор cntrl

Ответов: 5
Просмотров: 1510
Последний ответ 05.09.2020, 00:34:40
от effrit
Как сделать рабочим {loadposition} или jdoc:include в com_content?

Автор Amigo9876

Ответов: 5
Просмотров: 1724
Последний ответ 31.07.2020, 16:49:37
от tigra-uki
При переносе сайта на другой хостинг сайт обрезался

Автор kaminchik

Ответов: 3
Просмотров: 1259
Последний ответ 18.04.2019, 10:29:43
от Technic