
Originally Posted by
jeking
I've installed this for a client after upgrading from 1.3.9. The issue is an existing directory for a point of sale system resulting in a 404. The path is "www.STORE.com/pos/index.php". ...
Does this file (or any other file in the 3rd party "pos" code), require or include Zen Cart's "application_top.php"? In versions of Ultimate URLs <= 2.215, Zen Cart "frankenpages" placed inside sub-directories will trigger the "automatic redirects" feature. The temporary workaround is to disable "automatic redirects". This has been corrected in an upstream version (by adding code to detect and exclude "frankenpages" from the "automatic redirect" processing).
Does a file exist named "/pos.php", "/pos.html", "/pos.jpg", or anything else matching "/pos.*"? This is probably not the issue, but if a file does exist, you may need to disable Apache "MultiViews" by adding the following to your ".htaccess" file.
Code:
Options -MultiViews

Originally Posted by
jeking
... Disabling Ultimate URL does not work. But removing the htaccess file does. There is nothing else in the htaccess except this plugin info. I know it's supposed to ignore real files and directories, but it's not.
The last generic "catch all" rule in the .htaccess will ignore directories and files which do not physically exist. This is handled by Apache directly, not Zen Cart or Ultimate URLs. Issues here would point to a server configuration issue (or issues with other Apache server directives).
However if the 3rd party "pos" code uses the same URL schemes (ending with the same "anchors" - ex: -p-123, -c-123, -ezp-123, etc), the preceding rules are applied (including to physically existing resources). If for some reason the 3rd party "pos" code does use URLs matching the same format as Ultimate URLs, you can exempt the "pos" folder from the rules added by Ultimate URLs.
Code:
###############################################################################
# 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.
###############################################################################
# Skip Ultimate URLs directives for specific requests
RewriteCond %{REQUEST_URI} ^/pos/
RewriteRule .* - [S=12]
# 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]
NOTE: The above examples are intended for the ".htaccess" file provided with Ultimate URLs 2.215. If you are running a different version, you may need to adjust the rules to correctly skip the correct number of RewriteRule directives in your ".htaccess" file.
Bookmarks