I'm trying to use mod_rewrite to rewrite the URL displayed in the
browser address bar to the "www." form as described here:
http://httpd.apache.org/docs/2.0/rewrite/rewrite_guide.html#canonicalhost
This particular site is a ZenCart installation that is hosted. Thus I
have to use .htaccess files to make modifications.
I am already using a ZenCart module that rewrites URLs from a form such as:
http://alchemistswarehouse.com/store/index.php?main_page=product_info&cPath=39&products_id=7296
to a more SEO friendly form like:
http://alchemistswarehouse.com/store/digital-products/card-tricks-vol-1
I have these rules in my .htaccess file to accomplish the SEO friendly
rewrite:
#### BOF SSU
Options +FollowSymLinks -MultiViews
RewriteEngine On
# Make sure to change "zencart" to the subfolder you install ZC.
RewriteBase /store/
# Deny access from .htaccess
RewriteRule ^\.htaccess$ - [F]
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*) index.php?/$1 [E=VAR1:$1,QSA,L]
#### EOF SSU
To always rewrite the URL to http://www.alchemistswarehouse.com/*, I've
created this code:
RewriteCond %{HTTP_HOST} !^www\.alchemistswarehouse\.com [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/(.*) http://www.alchemistswarehouse.com/$1 [R]
I have tried putting this code in my .htaccess file in different places
but it doesn't seem to have any effect. I've even removed the "L" flag
from the SSU RewriteRule above but still no luck.
What am I missing?
Thanks,
Drew
--
Be a Great Magician!
Visit The Alchemist's Warehouse
http://www.alchemistswarehouse.com
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
" from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org