Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2010
    Posts
    23
    Plugin Contributions
    0

    Default Script errors appearing on site after .htaccess www redirect

    Hi there,

    I was wondering if anybody has some advice on how to resolve some script errors that appear on our site when I uses .htaccess to redirect our site to a domain name with the www prefix.

    We recently moved to a new server and upgraded to the most recent version of Zencart, and everything went smoothly, but we created the site with a domain name that didn't include the www prefix. Our SSL certificate requires the prefix, and after some research I realized an easy fix would be to use the .htaccess file to redirect the the site to display at all times with www. Bingo! Super easy.

    But then of course, it wasn't that simple. Now this error appears on all our product pages:

    ! Error loading language file
    http://oursite.com/includes/template...iew/lang/en.js

    It appears this is the slider used on that came with our template and is used throughout the site, and for some reason it can no longer find the language file. I've tried to find references to that language file through the Developer's Tool Kit, but no luck.

    I've poked around in the jquery.yoxview-2.21.js file to find the path for the language file, but I don't really understand what I'm looking at:

    Code:
    lang: "en", // The language for texts. The relevant language file should exist in the lang folder.
    langFolder: yoxviewPath + "lang/",
    Is there any way to edit this to include the www prefix? Or maybe should I look in the database with phpmyadmin?

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Script errors appearing on site after .htaccess www redirect

    Quote Originally Posted by RandyRand View Post
    we created the site with a domain name that didn't include the www prefix. Our SSL certificate requires the prefix
    So ... just change the HTTP_SERVER and HTTPS_SERVER settings in your configure.php files to include the www. prefix.
    Zen Cart will take care of the rest because it uses those to generate the clickable links and canonical URLs.

    Skip messing with .htaccess.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Mar 2010
    Posts
    23
    Plugin Contributions
    0

    Default Re: Script errors appearing on site after .htaccess www redirect

    That's awesome! Worked like a charm. Thanks so much. :)

 

 

Similar Threads

  1. v151 htaccess redirect from old subdirectory site to new subdomain site
    By Millie63 in forum General Questions
    Replies: 5
    Last Post: 29 May 2014, 10:31 PM
  2. v150 Cannot log in after adding www. redirect to .htaccess file
    By coreyalderin in forum General Questions
    Replies: 34
    Last Post: 19 Dec 2012, 05:23 PM
  3. Can't login after adding a 301 redirect in .htaccess
    By eutopia in forum Basic Configuration
    Replies: 0
    Last Post: 11 Oct 2011, 02:27 AM
  4. Cant login to admin after 301 redirect htaccess
    By Drunkguy in forum Basic Configuration
    Replies: 7
    Last Post: 15 Jan 2010, 11:54 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR