Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Dec 2010
    Location
    UK
    Posts
    1,771
    Plugin Contributions
    3

    Default Re: /index.php essential?

    Apologies for the delay.

    Code:
    	## 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} !^/mysecretadmin [NC]
    
    # Don't rewrite editors directory
    
    RewriteCond %{REQUEST_URI} !^/editors/ [NC]
    
    # Don't rewrite min directory
    
    RewriteCond %{REQUEST_URI} !^/min/ [NC]
    
    # Don't rewrite DELETEdownload directory
    
    RewriteCond %{REQUEST_URI} !^/DELETEdownload/ [NC]
    
    # Don't rewrite languages directory
    
    RewriteCond %{REQUEST_URI} !^/languages/ [NC]
    
    # Don't rewrite functions directory
    
    RewriteCond %{REQUEST_URI} !^/functions/ [NC]
    
    # Don't rewrite cgi-bin directory
    
    RewriteCond %{REQUEST_URI} !^/cgi\-bin/ [NC]
    
    # Don't rewrite logs directory
    
    RewriteCond %{REQUEST_URI} !^/logs/ [NC]
    
    # Don't rewrite auto_loaders directory
    
    RewriteCond %{REQUEST_URI} !^/auto_loaders/ [NC]
    
    # Don't rewrite setup directory
    
    RewriteCond %{REQUEST_URI} !^/setup/ [NC]
    
    # Don't rewrite classes directory
    
    RewriteCond %{REQUEST_URI} !^/classes/ [NC]
    
    # Handle all other URIs using Zen Cart (its index.php)
    
    RewriteRule .* index.php [QSA,L]
    
    ## END CEON URI MAPPING REWRITE RULE

  2. #2
    Join Date
    Dec 2010
    Location
    UK
    Posts
    1,771
    Plugin Contributions
    3

    Default Re: /index.php essential?

    This line the issue?
    RewriteRule .* index.php [QSA,L]

  3. #3
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: /index.php essential?

    Quote Originally Posted by picandnix View Post
    This line the issue?
    RewriteRule .* index.php [QSA,L]
    Sort of... let me explain. That line is what to do if all of the rewritecond (conditions to be met to support the rewrite rule) lines above check out as true... so, with the way it is currently testing, nothing specifically says: hey this is a demo site that is trying to be reached (or reverse, this isn't the main site that is trying to be reached) and then preventing the rewrite rule from taking action...

    But if you add:
    Code:
    RewriteCond %{HTTP_HOST} ^www.mydomain.com$ [OR]
    RewriteCond %{HTTP_HOST} ^mydomain.com$
    Somewhere above the rewriterule (but also after a previous rewriterule if there were one) and below the rewriteengine on statement then, if demo.mydomain.com is accessed, the uri will not be rewritten from the root domain when trying to access the sub-domain...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    Jun 2008
    Posts
    627
    Plugin Contributions
    0

    Default Re: /index.php essential?

    sounds like what I've encountered a number of times when installing a test cart to a sub-domain or sub-folder when the top domain cart is using ceon uri installed. Adding

    RewriteEngine Off

    to the .htaccess file of the cart in the sub folder or sub-domain stopped the problem

 

 

Similar Threads

  1. How to change index.php to index.php=2
    By maritam in forum General Questions
    Replies: 3
    Last Post: 16 Apr 2016, 05:52 PM
  2. Replies: 2
    Last Post: 25 Sep 2011, 12:18 PM
  3. index.php redirects to zc_install/index.php
    By wmorris in forum General Questions
    Replies: 24
    Last Post: 17 Oct 2007, 01:38 AM
  4. uploaded index.php to wrong index php HELP!
    By janiceM in forum General Questions
    Replies: 2
    Last Post: 3 Jul 2007, 08:45 PM
  5. Blank index.php and /admin/index.php page after install
    By gsummerlin in forum Installing on a Linux/Unix Server
    Replies: 4
    Last Post: 14 Jul 2006, 10:04 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