Gold R11 - SSL all pages cononical back to http

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
Odettes
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 102
Joined: Wed Apr 02, 2008 11:00 am
Location: Stockholm, Sweden
Contact:

Gold R11 - SSL all pages cononical back to http

Post by Odettes » Wed Oct 28, 2015 4:01 am

Hi!

When using SSL on all pages the "canonical" url points to "http://" instead of "https://", this is not good!
Why us http/https at all, wouldn't it just be better to use "//domain.com/url-path" instead? Google thinks so: https://support.google.com/webmasters/answer/6073543

Do I need the sourcecode to modify the "canonical" url or where can I find it?

Edit:
Change PageHelper.cs, BindMetaTags:

string objectUrl = storeUri.Scheme + "://" + storeUri.Authority + page.ResolveUrl(catalogObject.NavigateUrl);
to
string objectUrl = "https://" + storeUri.Authority + page.ResolveUrl(catalogObject.NavigateUrl);

will fix it for me..
Sincerely,
Thomas Berglund

https://traileronline.se
AbleCommerce Gold R11 Custom

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Gold R11 - SSL all pages cononical back to http

Post by mazhar » Wed Oct 28, 2015 6:16 am

Well make sure you have https based store URL under Administration > Configure > Security > System Settings

I think this should fix the canonical URL.

Odettes
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 102
Joined: Wed Apr 02, 2008 11:00 am
Location: Stockholm, Sweden
Contact:

Re: Gold R11 - SSL all pages cononical back to http

Post by Odettes » Thu Oct 29, 2015 12:25 am

mazhar wrote:Well make sure you have https based store URL under Administration > Configure > Security > System Settings

I think this should fix the canonical URL.
That fixed id, thanks.

But another problem, when enabling SSL on all pages it does a 302 when accessing the url from http.
Why is that? Should it not be a 301 (permanent move)?

Where can I change that?
Sincerely,
Thomas Berglund

https://traileronline.se
AbleCommerce Gold R11 Custom

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Gold R11 - SSL all pages cononical back to http

Post by mazhar » Thu Oct 29, 2015 12:58 am

I don't think so there is any easy way to change that. It happens in backend source and its using standard ASP.NET Response.Redirect method which issues 302.

Post Reply