Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

.htaccess переадресовывает на главную при нажатии на любую ссылку. SEO URL, SSL присутствует.


Recommended Posts

Здравствуйте. Проблема в следующем: Не могу понять, что не так в htaccess - При клике на любую страницу идет переадресация на главную. В чем может быть дело?

ocStore 2.3.0.2.3.

SEO URL + SeoPro (ЧПУ). Без SeoPro тоже самое получается.

SSL заказал у хостера, подключил, в Настройках включил.

Переадресация с http://domain.com/ на https://domain.com/ осуществляется функцией хостинга.

В конфигах корня и админа прописал:

//HTTP

define('HTTP_SERVER', 'http://www.domain.com/');

//HTTPS

define('HTTPS_SERVER', 'https://www.domain.com/');

.htaccess. Закомментированная строчка должна была делать редирект с обычных урлов на сеошные урлы. Но при ее активации, просто падают стили.

RewriteEngine ON
RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L]
RewriteRule ^system/download/(.*) index.php?route=error/not_found [L]
RewriteCond %{HTTPS} OFF
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .* http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteCond %{HTTPS} ON
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !\/$
RewriteCond %{REQUEST_URI} !\/[^\/]*\.[^\/]+$
RewriteRule .* http://%{HTTP_HOST}%{REQUEST_URI}/ [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !\/$
RewriteCond %{REQUEST_URI} !\/[^\/]*\.[^\/]+$
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI}/ [L,R=301]
# RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
<Files .htaccess>
Order Allow, Deny
Deny from All
</Files>
Options All -Indexes

 

Link to comment
Share on other sites


Поправил htaccess до такого состояния. Отсюда отталкиваться как-то надо.

Options +FollowSymlinks
RewriteEngine ON
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

RewriteCond %{HTTPS} OFF
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .* http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteCond %{HTTPS} ON
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !\/$
RewriteCond %{REQUEST_URI} !\/[^\/]*\.[^\/]+$
RewriteRule .* http://%{HTTP_HOST}%{REQUEST_URI}/ [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !\/$
RewriteCond %{REQUEST_URI} !\/[^\/]*\.[^\/]+$
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI}/ [L,R=301]

 

Link to comment
Share on other sites


Я бы сделал в access, так:

 

RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\.
RewriteRule (.*) https://domain.com//$1 [L,R=301]

а в Config и для корневой папки и для admin config поставил бы оба протокола и HTTP и HTTPS по одному и тому же сценарию (безопасному)

 

//HTTP

define('HTTP_SERVER', 'https://domain.com/');

//HTTPS

define('HTTPS_SERVER', 'https://domain.com/');

 

Это сделает как бы 2 в 1.
И обрежет WWW насовсем и принудительно сделает вам https доступ.

Все версии кроме https://domain.com/ будут исправляться.

 

htaccess.txt

Edited by zizka
Link to comment
Share on other sites


  • 2 years later...

ТОЧНО ТАКАЯ ЖЕ СИТУАЦИЯ, уже как не крутил вертел https + seo pro + ssl никак не хочет работать ПОМОГИТЕ КТО НИБУДЬ. 

Кто решил вопрос? и как?

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.