I am currently having problems with my URLS, after loads of tweaking and messing around i have finally got my site SSL'd up and SEO urls working however, when i click into a category or brand/manufacturer when i click a product from there the url's change and force the product to become another level url within the structure, surely it should be one url for each product e.g.
I have this product for sale, when clicked through from home page or directly url is:
https://discountaftershave.com/pall-mall-moustache-wax
If i click through from category page (mens-grooming) i get:
https://discountaftershave.com/mens-gro ... stache-wax
This is causing loss of images and stylesheets etc and is not right, any help would be appreciated.
Also why do non of the account pages seo urls work e.g. affiliate etc??
Thanks
Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com
eg: https://discountaftershave.com/mens-gro ... stache-wax
All images and css files are being modified to include mens-grooming in the url which should not be done.
Visit https://discountaftershave.com/mens-gro ... stache-wax and open browser console to view errors.
Regards,
Knowband Team
Opencart Plugins: Knowband Store
Email: support@knowband.com
So how should this be fixed, i understand what is wrong with it just need a little push in the direction of fixing it?
I would prefer the category and brand/manufacturer links to just link to the product page.
Thanks in advance
Pages still have canonical link defined in header, so shouldn't actually matter.Storeship wrote:Surely by adding manufacturers and categories to the product URL's you are then making 3 separate product urls which is not good seo practice?
This can be achieved either by modifying the code, which is quite painful in this case, or with redirects. I'm pretty sure there're tons of SEO extensions, which can do that. But I'd leave it as is, there's nothing bad with such behavior, because, like I said, canonical links are defined properly.Storeship wrote:I would prefer the category and brand/manufacturer links to just link to the product page.
Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com
OK, understand that but what about lost images and stylesheets, i assume they are relative urls's hence being unfound?thekrotek wrote:Pages still have canonical link defined in header, so shouldn't actually matter.Storeship wrote:Surely by adding manufacturers and categories to the product URL's you are then making 3 separate product urls which is not good seo practice?
This can be achieved either by modifying the code, which is quite painful in this case, or with redirects. I'm pretty sure there're tons of SEO extensions, which can do that. But I'd leave it as is, there's nothing bad with such behavior, because, like I said, canonical links are defined properly.Storeship wrote:I would prefer the category and brand/manufacturer links to just link to the product page.
1. If you add a menu item, Opencart will add the item in URL as http://www.domain.com/menuitem1
2. Sub menus are further added to the URL making it as http://www.domain.com/menuitem1/SubMenus
3. Now for further categories, it will be then added to the URL and thus making it longer.
What you can do is build canonical around the URL to make it user friendly. Alternatively you can have redirects with is a cumbersome task but these are the options you may look for.
Supporting Clients to manage their web products and helping them with Social media promotions. Looking after OpenCart and Umbraco sites at Cygnet. (http://www.cygnet-infotech.com)
Something's bad in configuration. Start with checking .htaccess file. There's a "RewriteBase" parameter out there. Next thing to check is HTTP_CATALOG and HTTPS_CATALOG constants in config.php.Storeship wrote:OK, understand that but what about lost images and stylesheets, i assume they are relative urls's hence being unfound?
Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com
# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/
RewriteBase /
# www to non-www redirect
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://discountaftershave.com/$1 [R,L]
RewriteCond %{HTTPS} !=on
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^system/download/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
Do not have HTTP_CATALOG and HTTPS_CATALOG constants defined in config.php.
It's HTTP_SERVER and HTTPS_SERVER, my bad, sorry. HTTP_CATALOG is for admin config.php only.Storeship wrote:Do not have HTTP_CATALOG and HTTPS_CATALOG constants defined in config.php.
Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com
Basically your base href should be static or css and others won't be found.
Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+
Thanks!
Thanks Artcore, that worked.artcore wrote:I remember that issue from another post: viewtopic.php?f=16&t=166036&p=632742#p632732
Basically your base href should be static or css and others won't be found.
If anyone else requires fix its as follows:
catalog/controller/common/header.php
replace this code
Code: Select all
$data['base'] = $server;
Code: Select all
$data['base'] = $this->config->get('config_store_id') == 0 ? HTTPS_SERVER : $server;
That's interesting. I understand the replacement and what's the reason of the issue. Yet I remember fixing this on my SSL-enabled site without any changes to the "base" parameter. Unfortunately, I completely forgot the routine. Only remember playing with .htaccess and config.php.Storeship wrote:If anyone else requires fix its as follows:
catalog/controller/common/header.php
replace this codewith this codeCode: Select all
$data['base'] = $server;
Code: Select all
$data['base'] = $this->config->get('config_store_id') == 0 ? HTTPS_SERVER : $server;
Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com
Users browsing this forum: No registered users and 4 guests