Jump to content
  • разработка интернет магазинов на opencart
  • доработка интернет магазинов на opencart

.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.