Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

shopping cart, login, password Forgotten not working


joe122joe

Recommended Posts

Hello guys.

I have store based on osc 2.2 and a few month ago installed osc 2.3 Edge in subcategory ,

on the old shop everything work fine but and the new one (Edge) not working good .. When the customer add product to cart and after that he want to buy it .after pressing checkout button and try to login to his account, nothing change no login or anything happens.  I noticed that the link become like this 

 myshop.com/newshop/login.php?cookie_test=1 

I have been try to fix it by Set Force Cookie Use to false and also set Recreate Session to false. 

and checking configure.php files  and the .htaccess file  by adding 

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

I don't know if its right code for subcategory folder .

 

I noticed that if I press on my orders, my address book, My password ,....there is same ending on the link (cookie_test=1 )
 

any help please.

Joe 

Link to comment
Share on other sites

Your .htaccess code is trying to force the use of SSL (https: ) at all times if the user had typed in http:. Is that what you intend? You really should choose either no www. or always use www. in the domain, for best SEO. It should match what the SSL certificate was issued for (www or no www). Your present code uses %{HTTP_HOST}, which is what the visitor typed in, and that could be either domain.com or www.domain.com.

 

I would add another couple of lines (after the above) to force the domain one way or the other.

To change incoming domain.com to always be www.domain.com:

RewriteCond  %{HTTP_HOST}  !^www\.  [NC]
RewriteRule  ^  https://www.domain.com%{REQUEST_URI}  [R=301,L]

or, to change incoming www.domain.com to always be domain.com:

RewriteCond  %{HTTP_HOST}  ^www\.  [NC]
RewriteRule  ^  https://domain.com%{REQUEST_URI}  [R=301,L]

If you're using a subdomain, or some other unusual setup, the above code would have to be adjusted.

 

See if getting a consistent domain name format (that matches your SSL certificate) clears up the problem, before you spend a lot of time diving into code.

 

Add: you still may get into trouble if the first thing you do is redirect to SSL with the wrong domain name (not matching the certificate). In that case, instead of using %{HTTP_HOST} in the "force SSL" RewriteRule, use www.domain.com or domain.com (whichever matches your SSL certificate).

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...