Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2009
    Posts
    35
    Plugin Contributions
    0

    Default How can I add www before my domain name

    I tried editing configure.php but it didn't change. Can someone help me.

  2. #2
    Join Date
    Jul 2009
    Posts
    35
    Plugin Contributions
    0

    Default Re: How can I add www before my domain name

    Ok, it do change when I go on a section to add it. Can I force the add of www when people don't enter it?

  3. #3
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: How can I add www before my domain name

    Editing the two configure.php files (one in /includes and one in admin/includes) should change it. Are you changing the permissions of those files first, so they are writable?

  4. #4
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: How can I add www before my domain name

    You can do this by adding a rule to the .htccess file. Or creating an .htaccess file if you don't have one. The rule will look like this:

    Code:
    RewriteEngine On
    
    RewriteCond %{HTTP_HOST} !^www\.mydomain\.com$ [NC]
    
    RewriteRule ^(.*)$ http://www.mydomain.com/$1 [L,R=301]
    You don't need the first line if it already exists in your .htaccess file.

    There is lots of information about htaccess online but you could start with:

    http://httpd.apache.org/docs/1.3/howto/htaccess.html

    What Stevesh says is good advice too ( we were typing at the same time). It is worth having a htaccess rule like this for all kinds of reasons, though.
    Last edited by niccol; 4 Dec 2009 at 08:15 PM.

  5. #5
    Join Date
    Jul 2009
    Posts
    35
    Plugin Contributions
    0

    Default Re: How can I add www before my domain name

    I made the change to both configure.php files. I can't find .htaccess file. Where do I have to look for it or what is the code of such a file if I need to make one?

  6. #6
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: How can I add www before my domain name

    Firstly, it is a hidden file so is easy to overlook (that's the dot at the start of the name) , but it is not part of Zen Cart default install so it is quite possible you do not have one.

    Create a blank file with a text editor.

    Copy that code into it , edited to match your domain name.

    Save it as .htaccess

    Upload it to the root of your site.

    Should work.

 

 

Similar Threads

  1. v150 Can't login to Admin panel after adding "www" to the domain name
    By TSN99 in forum General Questions
    Replies: 1
    Last Post: 31 Dec 2015, 08:43 AM
  2. Help My domain rewrites to http://domain.com instead of www
    By toussi in forum Installing on a Linux/Unix Server
    Replies: 3
    Last Post: 21 Aug 2008, 03:55 AM
  3. Domain Name Mismatch (https:// vs https://www
    By johana.pat in forum General Questions
    Replies: 5
    Last Post: 27 Apr 2008, 04:42 PM
  4. Replies: 9
    Last Post: 16 May 2007, 09:51 PM

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