
Originally Posted by
HammurIT
Sorted it by removing
RewriteEngine on
RewriteCond %{HTTP_HOST} ^customtables4u\.com$ [NC]
RewriteRule ^(.*)$ http://www.customtables4u.com/$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^.*/index.html
RewriteRule ^(.*)index.html$ http://www.customtables4u.com/$1 [R=301,L]
RewriteEngine On
RewriteRule ^(.*)/$ http://%{HTTP_HOST}/$1
...

Originally Posted by
mc12345678
Not so sure all of that had to go, but glad it resolved your issue. The bolded rule to me seemed like a possible problem ...
Agreed.
Simply placing the contents of the .htaccess provided by Ultimate URLs at the bottom of an existing .htaccess file is not the best solution. One should instead integrate the two .htaccess files... Removing redundant directives... Making sure directives are in the correct order... Keeping the directives organized... Using the correct directives for the desired outcome... I usually recommend consulting with someone VERY knowledgeable in regards to Apache server directives and configuration when modifying (or merging) .htaccess files.

Originally Posted by
mc12345678
*ugh* sorry, just realized. Let the lashings commence. Discussion is off topic from thread as previously identified. Sorry. May be helpful to some, but result is not caused by this plugin.
Correct the problem was NOT Ultimate URLs... But hold off the lashing! Good short slightly related posts are helpful and appreciated!
Now it is time for me to go a bit off topic...
First I see HammurIT's website is running on Apache 2.4 (good) and PHP 5.2 (bad). Would strongly recommend starting the process of upgrading to a version of Zen Cart 1.5.4 (or newer) and PHP 5.4 (or newer).
Second, I would recommend using mod_deflate or mod_gzip on images. The performance hit to compress already compressed image data is not worth the VERY minor gain. Any good software for editing images should do this automatically for JPEG, PNG, and other common image formats.
Third, no need for both mod_deflate and mod_gzip. You only need to enable one. Considering your server is Apache 2.4, mod_deflate is probably the appropriate one to use.
I'd probably use a .htaccess file similiar to:
Code:
###############################################################################
# Add custom headers and options
###############################################################################
# Notes:
#
# Examples: Adding IE compatibility / edge flags, language and encoding flags,
# php or suphp directives, configure other Apache modules such as page_speed,
# and enable or disable Apache httpd options.
#
# Do NOT configure anything directly relating to physical or virtual resources
# in this section. These should be addressed later on in this file.
###############################################################################
#Options -Indexes
# Hosting Provider Specific directive (change the PHP Version)
SetEnv DEFAULT_PHP_VERSION 5
# Configure basic gzip support
<IfModule mod_deflate.c>
AddOutPutFilterByType DEFLATE text/plain text/html text/xml text/css application/xml application/xhtml+xml application/rss+xml application/javascript
<IfModule mod_setenvif.c>
# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html
# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip
# MSIE masquerades as Netscape, but it is fine
# BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
# the above regex won't work. You can use the following
# workaround to get the desired effect:
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
# Don't compress images
SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary
</IfModule>
<IfModule mod_headers.c>
# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary
</IfModule>
</IfModule>
###############################################################################
# Enable mod_rewrite processing using the rules in this .htaccess file
###############################################################################
# Notes:
#
# <IfModule> should be avoided at all costs. If mod_rewrite is not available
# it is almost always better to return HTTP 500 status. This way one can see
# there is an issue as soon as the .htaccess file is uploaded.
#
# For mod_rewrite to work, the Apache server option to allow symbolic links to
# be followed must be enabled. Most providers supporting mod_rewrite will
# have it enabled by default. If rewrite rules are not working one can see if
# enabling symbolic links fixes the issue by un-commenting the first directive
# below (Options +FollowSymLinks).
#
# When the MultiViews option is enabled, negotiation rules from mod_negotiation
# are applied prior to any mod_rewrite directives. This can cause unintended
# behavior. For example if the directory "/cms/" does not exist and the file
# "/cms.php" exists, a request for "/cms/someimage.jpg" will be transformed
# internally by mod_negotiation to "/cms.php/someimage.jpg". To disable
# MultiViews un-comment the second directive below (Options -MultiViews).
#
# Don't forget, mod_rewrite directives are processed in order until a matching
# RewriteRule with the [L] flag is encountered. So the more specific a rule is
# the closer it should appear to the top of this file.
###############################################################################
#Options +FollowSymLinks
#Options -MultiViews
RewriteEngine on
###############################################################################
# Tell mod_rewrite where this file is relative to the server document_root
###############################################################################
# Notes:
#
# This directive should only be enabled if this .htaccess file is not placed
# in the document_root (usually public_html, www, or web) of the (sub)domain.
#
# An easy way to determine the location relative to the server document_root is
# to look at the URL used to access a file in this folder. For example if you
# access a "page" in the same folder as this file by typing in the URL
# "www.mydomain.com/myfolder/index.html" then "myfolder" will be the location
# of this file relative to the server document_root.
#
# Another quick and easy way to determine the correct setting for this is to
# look at the defined value for DIR_WS_CATALOG and DIR_WS_HTTPS_CATALOG in
# Zen Cart's configure.php files. All three values should match.
#
# Don't forget the leading and trailing /. This directive requires both!
###############################################################################
#RewriteBase /shop/
###############################################################################
# Redirect if request was for index.php (no query)
###############################################################################
# Notes:
#
# This is only required if the site generates references to index.php with no
# parameters. This rule will force a 301 redirect to the site root when a
# request is made for "/index.php" with no query terms (?key=value).
###############################################################################
#RewriteCond %{QUERY_STRING} ^$
#RewriteRule ^index\.php$ / [R=301,L]
###############################################################################
# Add any custom 301 redirects
###############################################################################
# Notes:
#
# In general these should be few and far between. If you use a RewriteRule
# be sure to add the L flag to let Apache mod_rewrite know to stop processing
# and skip any RewriteRules defined later in the .htaccess file.
###############################################################################
# FQDN redirect (don't apply to POST requests or data may be lost)
RewriteCond %{HTTP_HOST} ^customtables4u\.com$ [NC]
RewriteCond %{REQUEST_METHOD} !POST
RewriteRule ^(.*)$ http://www.customtables4u.com/$1 [R=301,L]
###############################################################################
# Redirect if request was for index.php (with or without query)
###############################################################################
# Notes:
#
# This is a performance optimization. If the request is for index.php simply
# pass the request on and do not process any other mod_rewrite directives in
# this file.
#
# Basically this avoids the overhead of checking if index.php is a real file
# or directory (used in subsequent mod_rewrite rules) before sending the
# request to index.php.
###############################################################################
RewriteRule ^index\.php$ - [L]
###############################################################################
# Start Ultimate (SEO) URLs
###############################################################################
# Notes:
#
# You should not make any changes in this section unless you really understand
# how it will impact your web site. Mistakes can break things.
###############################################################################
# Handles the new URL formats
RewriteRule ^(.*)-c-([0-9_]+)/(.*)-p-([0-9]+)(.*)$ index\.php?main_page=product_info&products_id=$4&cPath=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-c-([0-9_]+)/(.*)-pi-([0-9]+)(.*)$ index\.php?main_page=popup_image&pID=$4&cPath=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-c-([0-9_]+)/(.*)-pr-([0-9]+)(.*)$ index\.php?main_page=product_reviews&products_id=$4&cPath=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-c-([0-9_]+)/(.*)-pri-([0-9]+)(.*)$ index\.php?main_page=product_reviews_info&products_id=$4&cPath=$2&%{QUERY_STRING} [L]
# Original (unchanged) URL formats
RewriteRule ^(.*)-p-([0-9]+)(.*)$ index\.php?main_page=product_info&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-m-([0-9]+)(.*)$ index\.php?main_page=index&manufacturers_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-pi-([0-9]+)(.*)$ index\.php?main_page=popup_image&pID=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-pr-([0-9]+)(.*)$ index\.php?main_page=product_reviews&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-pri-([0-9]+)(.*)$ index\.php?main_page=product_reviews_info&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-ezp-([0-9]+)(.*)$ index\.php?main_page=page&id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-c-([0-9_]+)(.*)$ index\.php?main_page=index&cPath=$2&%{QUERY_STRING} [L]
# Rewrite all other requests (if the file / directory does not exist)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index\.php?main_page=$1&%{QUERY_STRING} [L]
###############################################################################
# Add any other directives relating to the handling of physical files
###############################################################################
# Notes:
#
# If processing makes it this far, the request was for a real file or folder.
# Example: Adding further processing related to browser caching or security.
###############################################################################
Bookmarks