Results 1 to 8 of 8
  1. #1
    Join Date
    May 2011
    Location
    Sunny Rossendale (not)
    Posts
    556
    Plugin Contributions
    2

    Default addon domain will only load with /inde.php

    Hi all just set up zencart on an addon domain and it loads fine as rvsolardotcodotuk/index.php but if I click on the home button I get 404 page not found, and the address changes to wwwdotrvsolardotcodotuk. I've contacted my host and they say it's a problem in the zencart config files but I can't see the problem includes php
    PHP Code:
    <?php
    /**
     * @package Configuration Settings circa 1.5.1
     * @copyright Copyright 2003-2012 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * File Built by zc_install on 2013-07-14 09:28:24
     */


    /*************** NOTE: This file is similar, but DIFFERENT from the "admin" version of configure.php. ***********/
    /***************       The 2 files should be kept separate and not used to overwrite each other.      ***********/

    // Define the webserver and path parameters
      // HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com
      // HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com
      
    define('HTTP_SERVER''http://www.rvsolar.co.uk');
      
    define('HTTPS_SERVER''https://www.rvsolar.co.uk');

      
    // Use secure webserver for checkout procedure?
      
    define('ENABLE_SSL''false');

    // NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
    // * DIR_WS_* = Webserver directories (virtual/URL)
      // these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
      
    define('DIR_WS_CATALOG''/');
      
    define('DIR_WS_HTTPS_CATALOG''/');

      
    define('DIR_WS_IMAGES''images/');
      
    define('DIR_WS_INCLUDES''includes/');
      
    define('DIR_WS_FUNCTIONS'DIR_WS_INCLUDES 'functions/');
      
    define('DIR_WS_CLASSES'DIR_WS_INCLUDES 'classes/');
      
    define('DIR_WS_MODULES'DIR_WS_INCLUDES 'modules/');
      
    define('DIR_WS_LANGUAGES'DIR_WS_INCLUDES 'languages/');
      
    define('DIR_WS_DOWNLOAD_PUBLIC'DIR_WS_CATALOG 'pub/');
      
    define('DIR_WS_TEMPLATES'DIR_WS_INCLUDES 'templates/');

      
    define('DIR_WS_PHPBB''/');

    // * DIR_FS_* = Filesystem directories (local/physical)
      //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
      
    define('DIR_FS_CATALOG''/home1/elcmsco1/public_html/rvsolarco/');

      
    //the following path is a COMPLETE path to the /logs/ folder  eg: /var/www/vhost/accountname/public_html/store/logs ... and no trailing slash
      
    define('DIR_FS_LOGS''/home1/elcmsco1/public_html/rvsolarco/logs');

      
    define('DIR_FS_DOWNLOAD'DIR_FS_CATALOG 'download/');
      
    define('DIR_FS_DOWNLOAD_PUBLIC'DIR_FS_CATALOG 'pub/');
      
    define('DIR_WS_UPLOADS'DIR_WS_IMAGES 'uploads/');
      
    define('DIR_FS_UPLOADS'DIR_FS_CATALOG DIR_WS_UPLOADS);
      
    define('DIR_FS_EMAIL_TEMPLATES'DIR_FS_CATALOG 'email/');
    admin includes php
    PHP Code:
    <?php
    /**
     * @package Configuration Settings circa 1.5.1
     * @copyright Copyright 2003-2012 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * File Built by zc_install on 2013-07-14 09:28:24
     */


    /*************** NOTE: This file is similar, but DIFFERENT from the "store" version of configure.php. ***********/
    /***************       The 2 files should be kept separate and not used to overwrite each other.      ***********/

    /**
     * WE RECOMMEND THAT YOU USE SSL PROTECTION FOR YOUR ENTIRE ADMIN:
     * To do that, make sure you use a "https:" URL for BOTH the HTTP_SERVER and HTTPS_SERVER entries:
     */
      
    define('HTTP_SERVER''http://www.rvsolar.co.uk');
      
    define('HTTPS_SERVER''https://www.rvsolar.co.uk');
      
    define('HTTP_CATALOG_SERVER''http://www.rvsolar.co.uk');
      
    define('HTTPS_CATALOG_SERVER''https://www.rvsolar.co.uk');

      
    // secure webserver for admin?  Valid choices are 'true' or 'false' (including quotes).
      
    define('ENABLE_SSL_ADMIN''false');

      
    // secure webserver for storefront?  Valid choices are 'true' or 'false' (including quotes).
      
    define('ENABLE_SSL_CATALOG''false');

    // NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
    // * DIR_WS_* = Webserver directories (virtual/URL)
      // these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
      
    $t1 parse_url(HTTP_SERVER);$p1 $t1['path'];$t2 parse_url(HTTPS_SERVER);$p2 $t2['path'];

      
    define('DIR_WS_ADMIN'preg_replace('#^' str_replace('-''\-'$p1) . '#'''dirname($_SERVER['SCRIPT_NAME'])) . '/');
      
    define('DIR_WS_CATALOG''/');
      
    define('DIR_WS_HTTPS_ADMIN'preg_replace('#^' str_replace('-''\-'$p2) . '#'''dirname($_SERVER['SCRIPT_NAME'])) . '/');
      
    define('DIR_WS_HTTPS_CATALOG''/');

      
    define('DIR_WS_IMAGES''images/');
      
    define('DIR_WS_ICONS'DIR_WS_IMAGES 'icons/');
      
    define('DIR_WS_CATALOG_IMAGES'HTTP_CATALOG_SERVER DIR_WS_CATALOG 'images/');
      
    define('DIR_WS_CATALOG_TEMPLATE'HTTP_CATALOG_SERVER DIR_WS_CATALOG 'includes/templates/');
      
    define('DIR_WS_INCLUDES''includes/');
      
    define('DIR_WS_BOXES'DIR_WS_INCLUDES 'boxes/');
      
    define('DIR_WS_FUNCTIONS'DIR_WS_INCLUDES 'functions/');
      
    define('DIR_WS_CLASSES'DIR_WS_INCLUDES 'classes/');
      
    define('DIR_WS_MODULES'DIR_WS_INCLUDES 'modules/');
      
    define('DIR_WS_LANGUAGES'DIR_WS_INCLUDES 'languages/');
      
    define('DIR_WS_CATALOG_LANGUAGES'HTTP_CATALOG_SERVER DIR_WS_CATALOG 'includes/languages/');

    // * DIR_FS_* = Filesystem directories (local/physical)
      
    define('DIR_FS_ADMIN'realpath(dirname(__FILE__) . '/../') . '/');
      
    //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
      
    define('DIR_FS_CATALOG''/home1/elcmsco1/public_html/rvsolarco/');

      
    //the following path is a COMPLETE path to the /logs/ folder  eg: /var/www/vhost/accountname/public_html/store/logs ... and no trailing slash
      
    define('DIR_FS_LOGS''/home1/elcmsco1/public_html/rvsolarco/logs');

      
    define('DIR_FS_CATALOG_LANGUAGES'DIR_FS_CATALOG 'includes/languages/');
      
    define('DIR_FS_CATALOG_IMAGES'DIR_FS_CATALOG 'images/');
      
    define('DIR_FS_CATALOG_MODULES'DIR_FS_CATALOG 'includes/modules/');
      
    define('DIR_FS_CATALOG_TEMPLATES'DIR_FS_CATALOG 'includes/templates/');
      
    define('DIR_FS_BACKUP'DIR_FS_ADMIN 'backups/');
      
    define('DIR_FS_EMAIL_TEMPLATES'DIR_FS_CATALOG 'email/');
      
    define('DIR_FS_DOWNLOAD'DIR_FS_CATALOG 'download/');
    What ever your doing remember to KISS ( Keep It Simple Stupid )

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

    Default Re: addon domain will only load with /inde.php

    It's not a Zen Cart thing. You'd get the same symptoms if you took Zen Cart out and replaced it with some other software altogether. It's a server issue.

    "index.php" is what's called the "default document" in Apache. Many hosts are configured by default to allow many "default document" possibilities, including: "index.htm index.html index.php" plus often a few others like index.shtml etc.

    Sometimes when a host upgrades PHP the Apache configuration doesn't properly get set to add back the "index.php" to the DirectoryIndex setting in Apache, thus those default document types don't fire without being specified.

    Or, you might have added your own custom .htaccess file to your site and stuffed it up with a bad DirectoryIndex setting.

    Additionally, there's another server configuration setting that treats www.example.com/ differently from www.example.com and still differently from www.example.com/index.php ... If your host has configured the server properly, then all three of those will work identically. If they're not working identically, then your host has some server tweaking to fix.


    Addendum: If you've got a blank index.htm or index.html file in the root of your site (same place as the index.php you've been talking about), then it could be that that's firing instead of index.php and thus the index.htm or .html file needs to just be deleted because it's conflicting.
    .

    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
    May 2011
    Location
    Sunny Rossendale (not)
    Posts
    556
    Plugin Contributions
    2

    Default Re: addon domain will only load with /inde.php

    Thanks for that, just reinstalled zencart just in case I messed up but no change will only load site with the index.php in site name. So I took look at the files installed there is no htaccess file in the root of the add on only this in my public_html. This was not writen by me but by a developer I hired so it might be there but I've not a clue where to look.
    PHP Code:
    RewriteEngine on

    RewriteCond 
    %{HTTP_HOST} ^rvsolarsystems\.co\.uk$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.rvsolarsystems\.co\.uk$
    RewriteRule ^store\/?(.*)$ "http\:\/\/www\.rvsolarsystems\.co\.uk\/$1" [R=301,L]

    RewriteOptions inherit

    RewriteCond 
    %{HTTP_HOST} ^rvsolarsystems\.co.uk$ [NC]
    RewriteRule ^(.*)$ http://www.rvsolarsystems.co.uk/$1 [R=301,L]
    ## BEGIN CEON URI MAPPING REWRITE RULE

    RewriteEngine On

    # Don't rewrite any URIs ending with a file extension (ending with .[xxxxx])
    RewriteCond %{REQUEST_URI} !\.[a-z]{2,5}$ [NC]
    # Don't rewrite any URIs for some, popular specific file format extensions,
    #   which are not covered by main file extension condition above
    RewriteCond %{REQUEST_URI} !\.(mp3|mp4|h264)$ [NC]
    # Don't rewrite any URIs for some specific file format extensions,
    #   which are not covered by main file extension condition above
    #   Uncomment the following line to apply this condition! (Remove the # at the start of the next line)
    #RewriteCond %{REQUEST_URI} !\.(3gp|3g2|h261|h263|mj2|mjp2|mp4v|mpg4|m1v|m2v|m4u|f4v|m4v|3dml)$ [NC]
    # Don't rewrite admin directory
    RewriteCond %{REQUEST_URI} !^/stockimages [NC]
    # Don't rewrite editors directory
    RewriteCond %{REQUEST_URI} !^/editors/ [NC]
    # Don't rewrite generator directory
    RewriteCond %{REQUEST_URI} !^/generator/ [NC]
    # Don't rewrite zen_bck directory
    RewriteCond %{REQUEST_URI} !^/zen_bck/ [NC]
    # Don't rewrite bmz_cache directory
    RewriteCond %{REQUEST_URI} !^/bmz_cache/ [NC]
    # Don't rewrite logs directory
    RewriteCond %{REQUEST_URI} !^/logs/ [NC]
    # Handle all other URIs using Zen Cart (its index.php)
    RewriteRule .* index.php [QSA,L]

    ## END CEON URI MAPPING REWRITE RULE
    ##developers name
    RewriteRule .* - [E=HTTP_IF_MODIFIED_SINCE:%{HTTP:If-Modified-Since}]
    RewriteRule .* - [E=HTTP_IF_NONE_MATCH:%{HTTP:If-None-Match}]
    SetEnv SERVER_ADMIN ino@rvsolarsystems.co.uk
    <Files 403.shtml>
    order allow,deny
    allow from all
    </Files>
    <
    Files .htaccess>
    order allow,deny
    deny from all
    </Files>
    ExpiresActive On
    ExpiresDefault A2592000 
    <FilesMatch "\.(ico|gif|jpg|jpeg|png|flv|pdf|swf|mov|mp3|wmv|ppt)$">
      
    ExpiresDefault A29030400
      Header append Cache
    -Control "public"
    </FilesMatch>
    <
    FilesMatch "\.(xml|txt|html|js|css)$">
      
    ExpiresDefault A2592000 
      Header append Cache
    -Control "public"
    </FilesMatch>
    <
    FilesMatch "\.(php|cgi|pl|htm)$">
      
    ExpiresDefault A0
      Header set Cache
    -Control "no-store, no-cache, must-revalidate, max-age=0"
      
    Header set Pragma "no-cache"
    </FilesMatch>
    AddDefaultCharset utf-8
    DefaultLanguage en
    -US
    <ifmodule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
    </ifmodule>
    <
    IfModule mod_headers.c>
    # Make sure proxies deliver correct content
    Header append Vary User-Agent env=!dont-vary
    # Ensure proxies deliver compressed content correctly
    Header append Vary Accept-Encoding
    </IfModule>
    ErrorDocument 404 /index.php?main_page=page_not_found
    ServerSignature Off
    ##developers name 
    What ever your doing remember to KISS ( Keep It Simple Stupid )

  4. #4
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: addon domain will only load with /inde.php

    Your "add-on" domain has been placed physically inside the "public_html" of another domain. This means rules applied to the main domain will also impact the "add-on" domain. If possible you should have the "add-on" domain reconfigured to be outside the main domain's "public_html". This can be configured on most hosting providers using CPanel or by contacting the host directly.

    So instead of "/home1/elcmsco1/public_html/rvsolarco" the "add-on" domain should be at "/home1/elcmsco1/rvsolarco/public_html". This way the two domains are not nested (and rules from one will not impact the other). This also allows you to place the Zen Cart "cache" and "log" folders for the "add-on" domain outside the "public_html" of both domains for example at "/home1/elcmsco1/rvsolarco/cache". As an added bonus, after this change the "add-on" domain will no longer be accessible from "http://www .rvsolarsystems .co.uk/rvsolarco/index.php".

    Otherwise you will need to add a number of exemptions to the rules (.htaccess file) on your main domain to avoid conflicts and to redirect requests for /rvsolarco to "http://www .rvsolar .co.uk/"
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  5. #5
    Join Date
    May 2011
    Location
    Sunny Rossendale (not)
    Posts
    556
    Plugin Contributions
    2

    Default Re: addon domain will only load with /inde.php

    Just heard back from my host this is what they have advised
    Restrict Access to Addon Domains through the Main Domain
    Summary

    All Addon Domains must be associated with a subdomain. You are able to disable access to the subdomain, this article will show you how to do this.

    Disable access to a subdomain

    The following is an example '.htaccess' code which provides a thorough means of making the Addon domain folders, and their contents, invisible through the main domain by forcing a "404 Not Found" error. This will work both for web browsers and search engines:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^(www.)?domain.com$ [NC]
    RewriteCond %{REQUEST_URI} ^/addonfolder/(.*)$
    RewriteRule ^(.*)$ - [L,R=404]

    The example rewrite rules will force 'http://www.domain.com/addonfolder/' and any of its contents to report the "404 Not Found" error.

    Be sure to replace the 'domain.com' in the example with your hosting account's main domain address and 'addonfolder' with the name of the folder for your Addon domain.

    This can also be applied to multiple Addon domain folders through the use of the [OR] option as in the following example in which 3 Addon folders are being reported as "404 Not Found" when accessed through the main domain:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^(www.)?domain.com$ [NC]
    RewriteCond %{REQUEST_URI} ^/addon1/(.*)$ [OR]
    RewriteCond %{REQUEST_URI} ^/addon2/(.*)$ [OR]
    RewriteCond %{REQUEST_URI} ^/addon3/(.*)$
    RewriteRule ^(.*)$ - [L,R=404]
    What ever your doing remember to KISS ( Keep It Simple Stupid )

  6. #6
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: addon domain will only load with /inde.php

    Quote Originally Posted by discoverytdi View Post
    Just heard back from my host this is what they have advised
    Restrict Access to Addon Domains through the Main Domain
    Summary

    All Addon Domains must be associated with a subdomain. You are able to disable access to the subdomain, this article will show you how to do this....
    So basically their tier I/II support is saying they will not allow you to have two domains under the same account with separate "document roots"... Not the ideal situation for hosting two separate domains.

    This impacts far more than just "blocking web access to the defined dummy subdomain" and "blocking web access to the 2nd domain's document root from the 1st domain" (Which is all the rules they gave you do)...

    This also impacts the contents of the ".htaccess" files in the document root of both domains... You will have to address the issues caused by having nested "docuement roots"... Including needing to REMOVE all "Redirect" directives in the two ".htaccess" files (you can replace with RewriteRules). You will also have to add special rules (additional RewriteConds) for each and every RewriteRule to only apply the rules based upon their containing folder and specified host name... Just plain ugly...
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  7. #7
    Join Date
    Mar 2014
    Location
    United States
    Posts
    4
    Plugin Contributions
    0

    Default Re: addon domain will only load with /inde.php

    Hi All - I'm not having a load problem but I am having a problem keeping the addon domain names in the address bar.

    For example, I have zen cart setup with domain1.com. Then I have doamin2.com and domain3.com added to my main account as addon domains with the root as the zen cart.

    Using any of the domain names, zen cart loads with the proper domain name in the address bar BUT with the addon domains, if I click on anything within zen cart, the URL in the address bar changes back to the domain1.com and does not continue to stay with the addon domain used.

    I do know about the configure.php file but wasn't sure if making changes there would render me errors.

    Any suggests here???

  8. #8
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: addon domain will only load with /inde.php

    Quote Originally Posted by nyrainman View Post
    I do know about the configure.php file but wasn't sure if making changes there would render me errors.
    You do need to change these files. It will only render errors if you make a mistake. :-)

    Cheers
    RodG

 

 

Similar Threads

  1. Host forced php upgrade to 5.3 Now site will not load
    By sperdie in forum Upgrading to 1.5.x
    Replies: 7
    Last Post: 17 Dec 2015, 04:15 AM
  2. v139h I Need An Addon That Will Allow Me To Only Sell Certain Products With Other Products
    By CaptainFacePalm in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 14 Feb 2014, 08:29 AM
  3. New Install - admin.php will not load properly
    By Gary777 in forum Installing on a Linux/Unix Server
    Replies: 9
    Last Post: 3 Oct 2008, 10:11 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