Page 1 of 2

URL’s SEO and SSL

Posted: Tue Jan 20, 2015 2:26 am
by brasseurs
Hi,

I have recently installed a SSL on my opencart and since, URL's SEo doesn't work correctly.

SEO are actived , it's probably a .htacess problem...

Example:
In the category equipment I have this url : https://www.brasseursartisans.com/index ... quipements

And I want : https://www.brasseursartisans.com/equipements

Can you help me?

Thanks

Re: URL’s SEO and SSL

Posted: Wed Jan 21, 2015 2:54 am
by brasseurs
This is my full .htaccess:

Code: Select all

# 1.To use URL Alias you need to be running apache with mod_rewrite enabled. 

# 2. In your opencart directory rename htaccess.txt to .htaccess.

# For any support issues please visit: http://www.opencart.com

#Options +FollowSymlinks

# Prevent Directoy listing 
Options -Indexes

# Prevent Direct Access to files
<FilesMatch "\.(tpl|ini|log)">
 Order deny,allow
 Deny from all
</FilesMatch>

#.htaccess SETTINGS TO TURN OFF  
# STUPID MAGIC QUOTES IN PHP  
# I HATE MAGIC QUOTES PROBLEMS  
#php_flag magic_quotes_gpc off 

# 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 /
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^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]
RewriteCond %{QUERY_STRING} ^route=common/home$
RewriteRule ^index\.php$ https://www.brasseursartisans.com? [R=301,L]

### Additional Settings that may need to be enabled for some servers 
### Uncomment the commands by removing the # sign in front of it.
### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that.

# 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it:
# php_flag register_globals off

# 2. If your cart has magic quotes enabled, This may work to disable it:
# php_flag magic_quotes_gpc Off

# 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try
# php_value upload_max_filesize 999M

# 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value post_max_size 999M

# 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_execution_time 200

# 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_input_time 200

# 7. disable open_basedir limitations
# php_admin_value open_basedir none

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

Re: URL’s SEO and SSL

Posted: Mon Jan 26, 2015 10:25 pm
by fido-x
That's a strange one. Mousing over the links shows the correct SEO enabled URL. But, when clicked, you get a different result (as you stated) in the address line. This may also be related to links not being SSL enabled in the controllers.

Try this: in catalog/controller/module/category.php, change line 46 from:

Code: Select all

'href' => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id'])
to:

Code: Select all

'href' => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id', 'SSL'])
And line 60 from:

Code: Select all

'href'        => $this->url->link('product/category', 'path=' . $category['category_id'])
to:

Code: Select all

'href'        => $this->url->link('product/category', 'path=' . $category['category_id', 'SSL'])
And see if that works in the module. If it does, similar changes would probably be needed in the category controller (and possibly others).

Re: URL’s SEO and SSL

Posted: Tue Jan 27, 2015 2:26 am
by brasseurs
Hi Fido-x,

The manipulation doesn't work..

This is my code (Not the same synthaxe of your exemple):

Code: Select all

);		
					    $product_total = $this->model_catalog_product->getTotalProducts($data);
						if ($this->config->get('config_product_count')) {
						$l3_data[] = array(
							'category_id' => $l3['category_id'],
							'name'        => $l3['name']. ' (' . $product_total . ')',
							'href'        => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id']. '_' . $l3['category_id'])
						);
						} else {
						$l3_data[] = array(
							'category_id' => $l3['category_id'],
							'name'        => $l3['name'],
							'href'        => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id']. '_' . $l3['category_id'])
						);
						}
					}

Re: URL’s SEO and SSL

Posted: Tue Jan 27, 2015 8:44 am
by fido-x
Looks like you've had some custom modifications done to the controller (e.g. $13_data) which may be interfering with SEO URLs.

Re: URL’s SEO and SSL

Posted: Sun Mar 01, 2015 9:40 pm
by brasseurs
Thanks Again Fido-x!

But since, I didn't solve my problem... Someone have any idea?

Thanks


Brasseurs

Re: URL’s SEO and SSL

Posted: Sun Jun 28, 2015 4:59 pm
by werwolf648
I have same problem - I need all pages to be in linked in https. Any Rewrite in htaccess I tried makes all links non-seo.
+ this trick anyway doesn't work with FB iframe tab - because last just doesn't allow to follow not secured links

Re: URL’s SEO and SSL

Posted: Tue Jan 19, 2016 5:47 pm
by Elnino3838
Same Prob here.

I guess we all want SSL everywhere for SEO purposes (new Google guidelines) but as long as you add something like this in your .htaccess to force all pages to load in https:

Code: Select all

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
URLs are no longer SEO friendly.

That's too bad. I am sure I did not modify the controller (don't have the skill for that!). Any help on this?

Thanks!

Re: URL’s SEO and SSL

Posted: Tue Jan 19, 2016 6:03 pm
by jrfcomputing
My SSL works for the whole site.

First I changed the config.php in both admin and root directories
Then I logged into admin and settings and turned ssl on there

Then added Code below to my htaccess file.

Code: Select all

RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Hope that helps

Re: URL’s SEO and SSL

Posted: Wed Jan 20, 2016 12:30 am
by jrfcomputing
If you use Openbay pro for ebay you also need to add this code to .htaccess

Code: Select all

RewriteCond %{QUERY_STRING} !^route=ebay/openbay/*
under

Code: Select all

RewriteCond %{HTTPS} off
Before

Code: Select all

RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Re: URL’s SEO and SSL

Posted: Wed Jan 20, 2016 5:28 pm
by Elnino3838
@jrfcomputing:

Your method is the same as the one I've tried. Yes the SSL works everywhere but no your URL are no longer SE friendly as it can read "index.php?route=....", at least on my OC 1.5.5.1 version.

I finally ended up buying this extension Force SSL Everywhere http://www.opencart.com/index.php?route ... n_id=22017 which works beautifully and keeps URL Search Engine Friendly.

Cheers.

Re: URL’s SEO and SSL

Posted: Fri Jan 22, 2016 5:50 pm
by jrfcomputing
@Elnino3838

Look at the code there is a difference. It works fine for me and my pages are all SEO friendly

Re: URL’s SEO and SSL

Posted: Mon Jan 25, 2016 4:28 pm
by Elnino3838
The difference doesn't come from the .htaccess code (it's basically the same). It's probably due to the difference in version. I'm running OC 1.5.5.1 and you are running 1.5.6.4.

Re: URL’s SEO and SSL

Posted: Mon Sep 12, 2016 11:48 am
by Melvin.C
Hey, Pros, My Friend built a webiste for me to start my business.we do LED Lights.

But right now we have a SEO URL problem with the site built with OPENCART.

Here is it :
http://www.theledmaster.com/Car-Racing- ... lood-Light
http://www.theledmaster.com/LED-Lightin ... lood-Light
http://www.theledmaster.com/LED-Lightin ... lood-Light
Basicly these three are the same product, but there are three different URL.that is not good for SEO.
And my friend is on vocation, he will not return till 8th Oct.
Can someone help me out ? Please.
Contact me at:
melvincheung228@gmail.com
Thanks.

Re: URL’s SEO and SSL

Posted: Tue Sep 13, 2016 6:12 pm
by ADD Creative
That is just the way OpenCart works. If you look at the page source you will see the canonical URL is set to the same for all pages.

Code: Select all

<link href="http://www.theledmaster.com/Car-Racing-Lighting-1000-Watt-LED-Flood-Light" rel="canonical" />
This tells search engines that they are all the same page and to use the URL in the canonical link when indexing. It should not be a problem.

Re: URL’s SEO and SSL

Posted: Fri May 12, 2017 4:44 am
by zaidladha
jrfcomputing you helped me a lot

I couldn't get the add to cart working on my home page but your code worked great for me, and I still have SEO friendly URLS.

RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]


Thank You!!!

Re: URL’s SEO and SSL

Posted: Fri Jan 05, 2018 6:58 pm
by Aditya Infotech
Hey guys,
As you all discussing SEO and SSL. So anyone can tell me how to convert any website from HTTP to HTTPS?
Just waiting for someone's reply..!!
It would be great if anyone helps me.
Thanks in advance...!!!!! :D

Re: URL’s SEO and SSL

Posted: Sun Jan 07, 2018 4:00 am
by IP_CAM
It would be great if anyone helps me.
Well, just search Google, the Web and this Forum are full of it. And if you don't understand,
you can always get it done by one of the Professionals. ( But only, if you not making a secret
about your OC Version and Site URL used...)
Good Luck! ;)
Ernie
---
viewtopic.php?f=179&t=191641#p690629
viewtopic.php?f=190&t=171302&p=656833#p656833
https://www.google.com/search?q=Opencart+SSL
http://docs.opencart.com/administration/ssl/
https://www.fastcomet.com/tutorials/ope ... enable-ssl

Re: URL’s SEO and SSL

Posted: Mon Oct 29, 2018 9:43 am
by yadawpawan
Hey guys,
As you all discussing SEO and SSL. So anyone can tell me it is possible to rank a non-https website on google first position for a particular keyword?
Just waiting for someone's reply..!!
It would be great if anyone helps me.
Thanks ...!!!!

Re: URL’s SEO and SSL

Posted: Mon Oct 29, 2018 10:43 pm
by yadawpawan
Hey guys,
As you all discussing SEO and SSL. So anyone can tell me how to convert any website from HTTP to HTTPS?
Just waiting for someone's reply..!!
It would be great if anyone helps me.
Thanks
SEO Classes in Nagpur