Re: Ceon URI Mapping v4.x
Something similiar to the following should work:
Code:
## BEGIN host specific settings
# Use PHP53 as default
AddHandler application/x-httpd-php53 .php
<IfModule mod_suphp.c>
suPHP_ConfigPath /opt/php53/lib
</IfModule>
## END host specific settings
## START Access control
# Block access from these IP Addresses
deny from 144.76.95.231
## END Access control
## BEGIN the usual suspects
# Enable mod_rewrite
RewriteEngine On
# Redirect all users to access the site WITH the 'www.' prefix
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST} !\.([a-z-]+\.[a-z]{2,6})$ [NC]
RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
## END the usual suspects
## BEGIN CEON URI MAPPING REWRITE RULE (folder "test")
# ONLY rewrite URIs beginning with /test/
RewriteCond %{REQUEST_URI} ^/test/ [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} !^/test/admin [NC]
# Don't rewrite editors directory
RewriteCond %{REQUEST_URI} !^/test/editors/ [NC]
# Don't rewrite !!storage directory
RewriteCond %{REQUEST_URI} !^/test/logs/ [NC]
# Handle all other URIs using Zen Cart (its index.php)
RewriteRule .* test/index.php [QSA,L]
## END CEON URI MAPPING REWRITE RULE (folder "test")
## BEGIN CEON URI MAPPING REWRITE RULE (site root)
# Don't rewrite the test folder
RewriteCond %{REQUEST_URI} !^/test/ [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} !^/admin [NC]
# Don't rewrite editors directory
RewriteCond %{REQUEST_URI} !^/editors/ [NC]
# Don't rewrite darkangel directory
RewriteCond %{REQUEST_URI} !^/private/ [NC]
# Don't rewrite cgi-bin directory
RewriteCond %{REQUEST_URI} !^/cgi-bin/ [NC]
# Handle all other URIs using Zen Cart (its index.php)
RewriteRule .* index.php [QSA,L]
## END CEON URI MAPPING REWRITE RULE (site root)
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType text/x-javascript "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresDefault "access plus 2 days"
</IfModule>
## EXPIRES CACHING ##
NOTE 1: mod_rewrite rules should always go from the most specific at the top to the most general at the bottom. They are matched in order from top to bottom (and L does not always mean last in a .htaccess file).
NOTE 2: The above assumes the "live" store is installed at "/public/" (URL of /) and the "test" store is installed at "/public/test/" (URL of /test/).
NOTE 3: If multiple domain names point to the same web root, one may wish to use slightly different code for the FQDN redirect.
Re: Ceon URI Mapping v4.x
Thanks, I will try that once I get all the owners stuff situated for transferring, right now I am answering more questions fromt eh owner than working on the site...LOL
Re: Ceon URI Mapping v4.x
Quote:
Originally Posted by
DarkAngel
Thanks, I will try that once I get all the owners stuff situated for transferring, right now I am answering more questions fromt eh owner than working on the site...LOL
Honestly if Conor were alive, he'd tell you that you need to setup your test site using a sub-domain and not just a simple folder off the root.. It will look like this:
Live site: http://yourdomain.com
Test Site: http://testsite.yourdomain.com
Ask your host for help in setting up a subdomain to point at your test site's folder if you don't know how to do this -- or Google it. This way your test site will behave like a top level domain and your production site's .htaccess SHOULD work on your test site too.. It will make code migrations MUCH easier too..
Re: Ceon URI Mapping v4.x
Thank you Diva, you always point out what my feeble mind tends to block out.
I shall do that...I am so mind boggled that i never thought of that.
Re: Ceon URI Mapping v4.x
I would agree.
Just to add my meagre experience, for many moons I was developing Zen Cart locally using an alias in the Apache config, so I would access my sites as
192.168.1.100/mytestsite.
It was only when I starting using the URI mapping that I was forced to do it "properly" and use virtual hosts and a redirect in my windows host files to use
www.mysite.local to access the local site. Otherwise the URI mapping was problematical.
Re: Ceon URI Mapping v4.x
Quote:
Originally Posted by
DivaVocals
*nods* Still sometimes issues though if the subdomain's public_root is nested inside the domain's public_root... Can be avoided by making sure the subdomain is not nested inside the public_root (cPanel hosting allows this, some bargain basement hosting does not).
Only real catch with using a subdomain is testing with SSL enabled. But one can always turn it off SSL during testing and turn it back on when ready to go live.
Quote:
Originally Posted by
torvista
I would agree.
...
It was only when I starting using the URI mapping that I was forced to do it "properly" and use virtual hosts and a redirect in my windows host files to use www.mysite.local to access the local site. Otherwise the URI mapping was problematical.
*nods* This is how I do the majority of my testing (local AMPP configurations - no nested public_root folders and certificates signed by a locally trusted authority). Allows testing with SSL enabled - without paying for a certificate or a hosting provider to install a certificate.
So where is this bandwagon headed? Might I suggest we meander into a club with live music?
Re: Ceon URI Mapping v4.x
Quote:
Originally Posted by
lhungil
*nods* Still sometimes issues though if the subdomain's public_root is nested inside the domain's public_root... Can be avoided by making sure the subdomain is not nested inside the public_root (cPanel hosting allows this, some bargain basement hosting does not).
True.. but I've managed to work through/around this...
Quote:
Originally Posted by
lhungil
Only real catch with using a subdomain is testing with SSL enabled. But one can always turn it off SSL during testing and turn it back on when ready to go live.
I've managed to get away with doing things this way.. **giggle** I know I know.. I can HEAR you smacking my hand from here..
Quote:
Originally Posted by
lhungil
So where is this bandwagon headed? Might I suggest we meander into a club with live music?
Did someone say music AND cocktails?????
Re: Ceon URI Mapping v4.x
Hello
I use a shared ssl certificate and my https server cataloge is //***.***.com/~***
It doesnt work and the installation checker says I cant have any subdirectory in the path in the configure.php
my host appends the /~ for my account.
Thanks Alot
Re: Ceon URI Mapping v4.x
Hi,
Would you be able to post the contents of your configuration file.
It might help in trying to figure out what the problem may be.
Thanks
Quote:
Originally Posted by
merica
Hello
I use a shared ssl certificate and my https server cataloge is //***.***.com/~***
It doesnt work and the installation checker says I cant have any subdirectory in the path in the configure.php
my host appends the /~ for my account.
Thanks Alot
Re: Ceon URI Mapping v4.x
Quote:
Originally Posted by
merica
Hello
I use a shared ssl certificate and my https server cataloge is //***.***.com/~***
It doesnt work and the installation checker says I cant have any subdirectory in the path in the configure.php
my host appends the /~ for my account.
Thanks Alot
Why not just buy an SSL Certificate? https://www.instantssl.com/free-ssl-...45022b5bc670fe