Re: Ceon URI Mapping v4.x
Quote:
Originally Posted by
ElPoderoso15
Code:
## BEGIN CEON URI MAPPING REWRITE RULE
RewriteEngine On
# ONLY rewrite URIs beginning with /new/estore/
RewriteCond %{REQUEST_URI} ^/new/estore/ [NC]
# 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} !^/new/estore/admin [NC]
# Don't rewrite editors directory
RewriteCond %{REQUEST_URI} !^/new/estore/editors/ [NC]
# Don't rewrite font directory
RewriteCond %{REQUEST_URI} !^/new/estore/font/ [NC]
# Don't rewrite logs directory
RewriteCond %{REQUEST_URI} !^/new/estore/logs/ [NC]
# Don't rewrite temp directory
RewriteCond %{REQUEST_URI} !^/new/estore/temp/ [NC]
# Handle all other URIs using Zen Cart (its index.php)
RewriteRule .* /new/estore/index.php [QSA,L]
## END CEON URI MAPPING REWRITE RULE
<IfModule mod_rewrite.c>
RewriteEngine On
# RewriteBase /new/
RewriteCond %{REQUEST_URI} ^/new/ [NC]
#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.
# Submitted by: ElliotHaughin
#ErrorDocument 404 /index.php
</IfModule>
The .htaccess has additional information to handle the root section (/new/) of the site. That section uses a CodeIgniter based solution. I've tried commenting out and even removing that portion with no luck.
I'm actually not sure where that setting is configured. I am not the original author of this project.
Thanks!
Regarding the second question of new/estore redirecting tonew, it should be noticeable that the second rewrite group doesn't exclude new/estore and therefore ttempts to rewrite whatever result from the first rewrite in the second rewrite. (Perhaps another way to prevent it, but I would check that the uri is not new/estore), this does mean that in the "second" store, the path of estore can not/should not be used for any rewrites in the admin.)
Re: Ceon URI Mapping v4.x
Quote:
Originally Posted by
mc12345678
Regarding the second question of new/estore redirecting tonew, it should be noticeable that the second rewrite group doesn't exclude new/estore and therefore ttempts to rewrite whatever result from the first rewrite in the second rewrite. (Perhaps another way to prevent it, but I would check that the uri is not new/estore), this does mean that in the "second" store, the path of estore can not/should not be used for any rewrites in the admin.)
Added the line below to the second section of the .htaccess to prevent it from redirecting new/estore to 'new'.
Code:
RewriteCond %{REQUEST_URI} !^/new/estore/ [NC]
This had no effect.
Re: Ceon URI Mapping v4.x
Quote:
Originally Posted by
DivaVocals
So it's clear to anyone following this thread the "includes/config-sites/sites_switch.php" is not part of this mod nor is it part of the default Zen Cart fileset..
It is part of the multi site module
Re: Ceon URI Mapping v4.x
Quote:
Originally Posted by
ElPoderoso15
Added the line below to the second section of the .htaccess to prevent it from redirecting new/estore to 'new'.
Code:
RewriteCond %{REQUEST_URI} !^/new/estore/ [NC]
This had no effect.
As you are not running Apache (I see a windows server running IIS 7.5), you may need to make the changes in your "Web.config" file for IIS instead of using the .htaccess file... I have not used the ISAPI filter for .htaccess files in many years, but remember it being a little quirky and not always working as expected.
I'm still seeing additional redirects which are not part of Zen Cart (are there additional .htaccess files, IIS redirect rules, or modules installed)? Some form of "proxy" or "cache" involved?
Code:
## ENABLE MOD_REWRITE
RewriteEngine On
## BEGIN CEON URI MAPPING REWRITE RULES
# ONLY rewrite URIs beginning with /new/estore/
RewriteCond %{REQUEST_URI} ^/new/estore($|/) [NC]
# 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} !^/new/estore/admin [NC]
# Don't rewrite editors directory
RewriteCond %{REQUEST_URI} !^/new/estore/editors/ [NC]
# Don't rewrite font directory
RewriteCond %{REQUEST_URI} !^/new/estore/font/ [NC]
# Don't rewrite logs directory
RewriteCond %{REQUEST_URI} !^/new/estore/logs/ [NC]
# Don't rewrite temp directory
RewriteCond %{REQUEST_URI} !^/new/estore/temp/ [NC]
# Handle all other URIs using Zen Cart (its index.php)
RewriteRule .* /new/estore/index.php [QSA,L]
## END CEON URI MAPPING REWRITE RULES
## START CODEIGNIGHTER REWRITE RULES
# ONLY rewrite URIs beginning with /new/
RewriteCond %{REQUEST_URI} ^/new/ [NC]
# Do not rewrite requests to /new/estore
RewriteCond %{REQUEST_URI} !/new/estore($|/) [NC]
#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
## END CODEIGNIGHTER REWRITE RULES
Re: Ceon URI Mapping v4.x
Quote:
Originally Posted by
Design75
It is part of the multi site module
Thanks.. NOW we have clarity!!:laugh:
Re: Ceon URI Mapping v4.x
Help pls as I have hardly any fingernails left!!
I'm upgrading my site so I've installed a subdomain to test zen cart in.
Original site: shop.com (Zencart version 1.3.8a PHP Version 5.2.17) - live site
Test site: zenner.shop.com (Zencart version 1.5.1 PHP Version 5.2.17)
In the subdomain zenner.shop.com I first installed ZC version 1.5.1 using softaculous. Then I downloaded ZC 1.5.1 and uploaded zc install folder. I created a new database and copied the database from 1.3.8a live site into the new database and upgraded. All working well on the new subdomain test site.
I downloaded and installed CEON URI MAPPING 4.4.1 on zenner.shop.com.
I read installation, configuration and fAQs.
I ran the installation check. All is fine. I created an .htaccess file by copying what was suggested on the configuration page of zc admin by the CEON module and uploaded it to public_html/zenner.
I created a new category to test called: testing
HOWEVER when I test zenner.shop.com/testing I keep getting:
Not Found
The requested URL /testing was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
I tried changing the last line in the htaccess:
# Handle all other URIs using Zen Cart (its index.php)
RewriteRule .* index.php [QSA,L]
# Handle all other URIs using Zen Cart (its index.php)
RewriteRule .* /index.php [QSA,L]
# Handle all other URIs using Zen Cart (its index.php)
RewriteRule .* zenner/index.php [QSA,L]
# Handle all other URIs using Zen Cart (its index.php)
RewriteRule .* /zenner/index.php [QSA,L]
Nothing works!
When I disable CEON URI module the testing category works and shows up as zenner.shop.com/testing?zenid=abaccf73d23b992636e89fb68ad03aa8
I've spoke to my host who said that rewrite module is on [~]# httpd -l | grep mod_rewrite.c and said the rewrite code looks ok too.
I'm at my wits end and want to scream.
Can anyone help me avoid a breakdown pretty pls?
Re: Ceon URI Mapping v4.x
Quick update
I put the rewrite rule in the root htaccess of my cpanel and it seems to work. However it messed up all my other sites on cpanel so I had to remove it.
The problem is the zencart is installed in a subdomain of an addon domain. When testing is ready I will move it to the addon domain.
Can someone tell me if the module will work if I put the rewrite rule in the htaccess of the addon domain. If so what should the last line of the rewrite rule read?
CEON is installed in subdomain of addon domain
main domain: ecl.com
addon domain: shop.com (where shop.com/zencart - is the live site)
subdomain: zenner.shop.com
hello anyone? :blush:
Re: Ceon URI Mapping v4.x
Problem solved
I had forgotten to include the subdomain in the main htaccess
RewriteCond %{HTTP_REFERER} !^http://www.zenner.shop.com/.*$ [NC]
Sorry about the rant :)
Re: Ceon URI Mapping v4.x
Apologies if this has been posted before, I'm just logging it quickly for others before I go off to work:
error received (PHP 5.4)
PHP Code:
PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 2604203801 bytes) in /includes/classes/class.CeonURIMappingHREFLinkBuilder.php on line 378
if the following isn't the appropriate fix then it certainly appears to do the trick.
Taken from this thread https://www.zen-cart.com/showthread....14#post1240514 as per Lat9 and DrByte on a similar issue:
find includes/classes/class.CeonURIMappingHREFLinkBuilder.php approx 376 replace
PHP Code:
// Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined
if ($add_session_id == true && $session_started == true && SESSION_FORCE_COOKIE_USE == 'False') {
if (defined('SID') && zen_not_null(SID)) {
$sid = SID;
with
PHP Code:
// Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined
if ($add_session_id == true && $session_started == true && SESSION_FORCE_COOKIE_USE == 'False') {
if (defined('SID') && zen_not_null(constant('SID'))) {
$sid = constant('SID');
Re: Ceon URI Mapping v4.x
It's an appropriate fix ...