Post by markcm » Fri Jul 27, 2018 10:40 pm

My 3.0.2.0 site www.e-lectronics.net recently stopped loading the icons such as My Account/Wishlist/Cart/Checkout/Reviews/Search. When these icons are missing, I also find my Ajax search suggestion doesn't work

Refreshing or clearing the browser cache doesn't seem to help although if I click around pages such as My Account (I think once I hit an https page) they will usually load and then I can go back to the home or product page that didn't load and they are loaded and the ajax quick search works. Once I close and reload the homeor product page (without https) they are gone again.

I think it might have to do with "www" for example, if I browse to www.e-lectronics.net I get this issue but If I open a fresh page of http://e-lectronics.net it loads properly. I recall once upon a time being asked if I want my domain to have the www or not but I dont recall how to manage that (or why I have to choose since that makes things pretty difficult. Is this an Htaccess setting I can check or adjust to make sure it always routes properly? Or a cPanel setting where I can add the www back in?

If anyone has seen this before or has a moment to check my home page I would really appreciate that.

Newbie

Posts

Joined
Sat Jul 14, 2018 5:02 am


Post by IP_CAM » Sat Jul 28, 2018 12:24 am

Well, this is the only correct address, according to your Setup.
https://www.e-lectronics.net/
check here for a solution on this:
viewtopic.php?f=190&t=204951&p=729944#p725895
viewtopic.php?f=20&t=148516#p594619
https://www.opencart.com/index.php?rout ... n_id=25465
https://www.opencart.com/index.php?rout ... n_id=26740
or then, ask Google about .htaccess redirect / rewrite routines.
Good Luck! ;)
Ernie

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by markcm » Sat Jul 28, 2018 3:56 am

Thank you Ernie,

I think I have something "cobbled together " now that looks like it is working.

I've been self supporting my site for about 15 years now and try to keep notes, I recall at somepoint being asked to set my domain with or without "www." and I can't remember if that was from Godaddy or a Goggle webmaster thing or what. Now that I've recently migrated from my prior oscmax (was oscommerce before that) I'm using google webmaster tools to see where the conflicts are and many of my existing organic links appear to not have the "www."

Since I dont' even know what was my standard before, I've picked {https://www.} for my new opencart installation and I'm trying to make it a smooth transition for users. If anyone thinks https://www. is not the best choice for all store pages, please speak up. From the migration, I can already see a decrease in my google rank from a week of mis-matched URLs so this really is important stuff.

With your help and the information in the links and some googling, I intend to use .htaccess to rewrite all requests to be in the format of https://www.{sitename}.net. My first attempt was adding this directly after the rewriteEngine On

Code: Select all

RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [L,NE,R=301]
Although this was effective for rewriting all requests to https:// , it was not successful at forcing inclusion of www. I will look at my godaddy Cpanel to make sure I don't have some rules configured there which may be trying to remove the www. I know I don't have any redirects in cpanel but maybe there is a domain name setting doing some tricks.

Since that didn't fully work, I ended up with this next bit which works for both https:// and www. although I suspect it is not the best written and I welcome suggestion to clean it up:

Code: Select all

RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.mysitename.net/$1 [L,R=301]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://www.mysitename.net/$1 [L,R=301]

Newbie

Posts

Joined
Sat Jul 14, 2018 5:02 am

Who is online

Users browsing this forum: No registered users and 104 guests