Jump to content
Sign in to follow this  
VladRevan

Не могу склеить дубли

Recommended Posts

Добрый день, форумчане.

Спасайте!

Не могу никак склеить дубли. Исправил .htaccess как многие советуют, поставил SEO PRO, и все равно кроме главной, ни один дубль полностью не склеился.

Сам внешний вид ссылок исправил, никаких index? или path?= больше нет, но на всех страницах, кроме главной если перед адресом поставить www, меня выбивает на дубль, при том с очень некрасивым адресом, например если site.ru/about_us дописать www, получится www.site.ru/index.php?_route_=about_us/

Как быть?

На всякий случай прилагаю содержание своего .htaccess

 

Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
RewriteCond %{HTTP_HOST} ^www.адрессайта.ru$ [NC]
RewriteRule ^(.*)$ http://адрессайта.ru/$1 [R=301,L]

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\ HTTP/
RewriteRule ^index\.html$ / [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ / [R=301,L]


 

Share this post


Link to post
Share on other sites
В htaccess (вам нужно поправить вашу запись)
 
# NO WWW
RewriteCond %{HTTP_HOST} ^www\.domen\.com
RewriteRule ^(.*)$ http://domen.ru/$1 [R=permanent,L]
 
 
В базе данных выполнить запрос
INSERT INTO oc_url_alias (query, keyword) VALUES ('common/home', '');

Share this post


Link to post
Share on other sites

Если хотите избавиться от почти всех роутов

 

INSERT INTO oc_url_alias (query, keyword) VALUES ('common/home', '');
INSERT INTO oc_url_alias (query, keyword) VALUES ('account/wishlist', 'wishlist');
INSERT INTO oc_url_alias (query, keyword) VALUES ('account/account', 'my-account');
INSERT INTO oc_url_alias (query, keyword) VALUES ('checkout/cart', 'shopping-cart');
INSERT INTO oc_url_alias (query, keyword) VALUES ('checkout/checkout', 'checkout');
INSERT INTO oc_url_alias (query, keyword) VALUES ('account/login', 'login');
INSERT INTO oc_url_alias (query, keyword) VALUES ('account/logout', 'logout');
INSERT INTO oc_url_alias (query, keyword) VALUES ('account/order', 'order-history');
INSERT INTO oc_url_alias (query, keyword) VALUES ('account/newsletter', 'newsletter');
INSERT INTO oc_url_alias (query, keyword) VALUES ('product/special', 'specials');
INSERT INTO oc_url_alias (query, keyword) VALUES ('affiliate/account', 'affiliates');
INSERT INTO oc_url_alias (query, keyword) VALUES ('checkout/voucher', 'gift-vouchers');
INSERT INTO oc_url_alias (query, keyword) VALUES ('product/manufacturer', 'brands');
INSERT INTO oc_url_alias (query, keyword) VALUES ('information/contact', 'contact-us');
INSERT INTO oc_url_alias (query, keyword) VALUES ('account/return/insert', 'request-return');
INSERT INTO oc_url_alias (query, keyword) VALUES ('information/sitemap', 'sitemap');
INSERT INTO oc_url_alias (query, keyword) VALUES ('account/forgotten', 'forgot-password');
INSERT INTO oc_url_alias (query, keyword) VALUES ('account/download', 'downloads');
INSERT INTO oc_url_alias (query, keyword) VALUES ('account/return', 'returns');
INSERT INTO oc_url_alias (query, keyword) VALUES ('account/transaction', 'transactions');
INSERT INTO oc_url_alias (query, keyword) VALUES ('account/register', 'create-account');
INSERT INTO oc_url_alias (query, keyword) VALUES ('product/compare', 'compare-products');
INSERT INTO oc_url_alias (query, keyword) VALUES ('product/search', 'search');
INSERT INTO oc_url_alias (query, keyword) VALUES ('account/edit', 'edit-account');
INSERT INTO oc_url_alias (query, keyword) VALUES ('account/password', 'change-password');
INSERT INTO oc_url_alias (query, keyword) VALUES ('account/address', 'address-book');
INSERT INTO oc_url_alias (query, keyword) VALUES ('account/reward', 'reward-points');
INSERT INTO oc_url_alias (query, keyword) VALUES ('affiliate/edit', 'edit-affiliate-account');
INSERT INTO oc_url_alias (query, keyword) VALUES ('affiliate/password', 'change-affiliate-password');
INSERT INTO oc_url_alias (query, keyword) VALUES ('affiliate/payment', 'affiliate-payment-options');
INSERT INTO oc_url_alias (query, keyword) VALUES ('affiliate/tracking', 'affiliate-tracking-code');
INSERT INTO oc_url_alias (query, keyword) VALUES ('affiliate/transaction', 'affiliate-transactions');
INSERT INTO oc_url_alias (query, keyword) VALUES ('affiliate/logout', 'affiliate-logout');
INSERT INTO oc_url_alias (query, keyword) VALUES ('affiliate/forgotten', 'affiliate-forgot-password');
INSERT INTO oc_url_alias (query, keyword) VALUES ('affiliate/register', 'create-affiliate-account');
INSERT INTO oc_url_alias (query, keyword) VALUES ('affiliate/login', 'affiliate-login');
 
можете поправить keуword на другие

Share this post


Link to post
Share on other sites

 

Если хотите избавиться от почти всех роутов

 

INSERT INTO oc_url_alias (query, keyword) VALUES ('common/home', '');
INSERT INTO oc_url_alias (query, keyword) VALUES ('account/wishlist', 'wishlist');
INSERT INTO oc_url_alias (query, keyword) VALUES ('account/account', 'my-account');
INSERT INTO oc_url_alias (query, keyword) VALUES ('checkout/cart', 'shopping-cart');
INSERT INTO oc_url_alias (query, keyword) VALUES ('checkout/checkout', 'checkout');
INSERT INTO oc_url_alias (query, keyword) VALUES ('account/login', 'login');
INSERT INTO oc_url_alias (query, keyword) VALUES ('account/logout', 'logout');
INSERT INTO oc_url_alias (query, keyword) VALUES ('account/order', 'order-history');
INSERT INTO oc_url_alias (query, keyword) VALUES ('account/newsletter', 'newsletter');
INSERT INTO oc_url_alias (query, keyword) VALUES ('product/special', 'specials');
INSERT INTO oc_url_alias (query, keyword) VALUES ('affiliate/account', 'affiliates');
INSERT INTO oc_url_alias (query, keyword) VALUES ('checkout/voucher', 'gift-vouchers');
INSERT INTO oc_url_alias (query, keyword) VALUES ('product/manufacturer', 'brands');
INSERT INTO oc_url_alias (query, keyword) VALUES ('information/contact', 'contact-us');
INSERT INTO oc_url_alias (query, keyword) VALUES ('account/return/insert', 'request-return');
INSERT INTO oc_url_alias (query, keyword) VALUES ('information/sitemap', 'sitemap');
INSERT INTO oc_url_alias (query, keyword) VALUES ('account/forgotten', 'forgot-password');
INSERT INTO oc_url_alias (query, keyword) VALUES ('account/download', 'downloads');
INSERT INTO oc_url_alias (query, keyword) VALUES ('account/return', 'returns');
INSERT INTO oc_url_alias (query, keyword) VALUES ('account/transaction', 'transactions');
INSERT INTO oc_url_alias (query, keyword) VALUES ('account/register', 'create-account');
INSERT INTO oc_url_alias (query, keyword) VALUES ('product/compare', 'compare-products');
INSERT INTO oc_url_alias (query, keyword) VALUES ('product/search', 'search');
INSERT INTO oc_url_alias (query, keyword) VALUES ('account/edit', 'edit-account');
INSERT INTO oc_url_alias (query, keyword) VALUES ('account/password', 'change-password');
INSERT INTO oc_url_alias (query, keyword) VALUES ('account/address', 'address-book');
INSERT INTO oc_url_alias (query, keyword) VALUES ('account/reward', 'reward-points');
INSERT INTO oc_url_alias (query, keyword) VALUES ('affiliate/edit', 'edit-affiliate-account');
INSERT INTO oc_url_alias (query, keyword) VALUES ('affiliate/password', 'change-affiliate-password');
INSERT INTO oc_url_alias (query, keyword) VALUES ('affiliate/payment', 'affiliate-payment-options');
INSERT INTO oc_url_alias (query, keyword) VALUES ('affiliate/tracking', 'affiliate-tracking-code');
INSERT INTO oc_url_alias (query, keyword) VALUES ('affiliate/transaction', 'affiliate-transactions');
INSERT INTO oc_url_alias (query, keyword) VALUES ('affiliate/logout', 'affiliate-logout');
INSERT INTO oc_url_alias (query, keyword) VALUES ('affiliate/forgotten', 'affiliate-forgot-password');
INSERT INTO oc_url_alias (query, keyword) VALUES ('affiliate/register', 'create-affiliate-account');
INSERT INTO oc_url_alias (query, keyword) VALUES ('affiliate/login', 'affiliate-login');

 

можете поправить keуword на другие

 

 

Сделал, как вы написали, включая правку htaccess - никакого эффекта, увы.

Share this post


Link to post
Share on other sites

 

Установлен SEO PRO, я же писал. Дубли товаров он убрал, сделал их вида site/category/product. У меня же проблема в другом. Если вписать адрес без www - все отлично. Если вбить перед адресом www, то перекидывает на дубль, при том, абсолютно на всех страницах так, даже на товарах. Только на главной все ок.

Share this post


Link to post
Share on other sites

а.. погуглите www редирект

+ на некоторых хостингах это настраивается в панели управления.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×

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.