support

Author Topic: AJAX ERROR - when WWW. isn't in URL  (Read 6640 times)

Offline evolancer

  • Newbie
  • *
  • Posts: 6
  • Karma: +2/-0
    • View Profile
AJAX ERROR - when WWW. isn't in URL
« on: September 18, 2014, 08:44:50 PM »
Under the settings: I have my full-site URL set too: "www .mysite. com" but when I'm typing in "mysite .com" into a browser its not redirecting it to  www .mysite .com with the "www" added in. This gives me an UNKNOWN AJAX ERROR when adding products to my cart. Is their a fix for this or is AbanteCart aware of this issue.

I'm also on the HTML5 Template if that helps.

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5987
  • Karma: +284/-2
    • View Profile
Re: AJAX ERROR - when WWW. isn't in URL
« Reply #1 on: September 19, 2014, 01:38:51 AM »
Hello.

If you want to redirect all non-www requests to your site to the www version, all you need to do is add the following code to your .htaccess file
Code: [Select]
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
This will redirect any requests from http://my-domain.com to http://www.my-domain.com.

Offline evolancer

  • Newbie
  • *
  • Posts: 6
  • Karma: +2/-0
    • View Profile
Re: AJAX ERROR - when WWW. isn't in URL
« Reply #2 on: September 19, 2014, 09:13:54 AM »
Thank you I will give this a shot!

 

Powered by SMFPacks Social Login Mod