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

Recommended Posts

Здравствуйте.

Вот магазин: http://www.shop.erolife.by

вот мой код .htaccess

Options +FollowSymlinks

# Prevent Directoy listing

Options -Indexes

# Prevent Direct Access to files

<FilesMatch "\.tpl">

Order deny,allow

Deny from all

</FilesMatch>

# SEO URL Settings

RewriteEngine On

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)\?*$ index.php?_route_=$1 [L,QSA]

RewriteCond %{QUERY_STRING} ^route=common/home$

RewriteRule ^index\.php$ http://www.shop.erolife.by? [R=301,L]

AddDefaultCharset UTF-8

- Если зайти на сайт по ссылке с "www." www.shop.erolife.by, то валюи магазина усинавливается в белорусские рубли(что правильно), но если в меню попыться выбрать "Доллар", то ничего не произойгдет.

- Если зайти на сайте без "www." shop.erolife.by, то валюи усинвливается в доллары США и при попытке изменить в белорусский рубли смена происходит, но если после этого снова попыиться высивить в доллары, снова ничего не произойгдет.

Как подправить .htacccess, чтобы смена валют рилиила корректно?

Заранее спс

P.S. если не понятно описал, попробуйте просто зайти на сайт и попыиться несколько раз поменять валюту магазина - поймете о чем я

Link to comment
Share on other sites



Options +FollowSymlinks

# Prevent Directoy listing

Options -Indexes

# Prevent Direct Access to files

<FilesMatch "\.tpl">

Order deny,allow

Deny from all

</FilesMatch>

# SEO URL Settings

RewriteEngine On

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)\?*$ index.php?_route_=$1 [L,QSA]

RewriteCond %{REQUEST_METHOD} ^GET$

RewriteCond %{QUERY_STRING} ^$ [OR]

RewriteCond %{QUERY_STRING} ^route=common/home$ [NC]

RewriteRule ^index\.php$ /? [R=301,L]

AddDefaultCharset UTF-8

Link to comment
Share on other sites

Те правки которые я сгделал редиректят не только ссылки

index.php?route=common/home

но и ссылки

index.php

и это нормально когда надо избавиться от иких внешних ссылок, но когда сайт сам генерит икие ссылки - это в листом вигде садо-мазо... Почему не избавляешся от ссылок вида index.php?route=common/home на уровне движка? Ведь это гделается одной строчкой в когде...

Link to comment
Share on other sites

"Почему не избавляешся от ссылок вида index.php?route=common/home на уровне движка?"

Потомучто первый раз об этом слышу:) Ггде что прописать?

Link to comment
Share on other sites


Пропишите в файле system/library/response.php это:

if (!defined('HTTP_CATALOG')) $this->output = str_replace('index.php?route=common/home', '', $this->output);

Прописывать нужно после:

public function output() {

Yesvik, спасипотому что вам за решение. Как избавиться от осильных ссылок типа:

index.php?route=checkout/cart

index.php?route=account/login

index.php?route=product/manufacturer

и др. Спасипотому что!

Link to comment
Share on other sites


Yesvik, спасипотому что вам за решение. Как избавиться от осильных ссылок типа:

index.php?route=checkout/cart

index.php?route=account/login

index.php?route=product/manufacturer

Я выкладывал seopack с кучей прибамбасов для SEO URL. В нем был модуль SEO URL Manager который в том лисле и с этими route решал проблемы. Но пакет полулился потому чтольшим и сложным в усиновке... меня порвали вопросами и я его убрал, решив разгделить на несколько частей поменьше. Но SEO URL Manager я хоть и обещал выложить отгдельно - ик и не выложил из-за нехватки времени, а теперьь уже и выкладывать смысла нет - надо переписывать под 1.5
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.