Trying to turn off Ultimate URLs for a specific subfolder (Google_Merchant) by updating .htaccess but it's not working. Is there something else needed?
(It redirects back to index.php)
Printable View
Trying to turn off Ultimate URLs for a specific subfolder (Google_Merchant) by updating .htaccess but it's not working. Is there something else needed?
(It redirects back to index.php)
I would have thought one of
RewriteCond %{REQUEST_URI} !^/store/Google_Merchant [NC]
RewriteCond %{REQUEST_URI} !^/Google_Merchant [NC]
would do it - but no.
I get bumped back to store root.
https://site.com/store/index.html?args
OK, what's the link look like prior to the unwanted redirection?
Could you send me a copy of the current .htaccess via direct email so that I can review?
Following up: It turns out that the unwanted redirect to the site's home page was being issued by the Google Merchant Center processing. No change needed to the USU .htaccess.
I need a little help in configuring Ultimate URLs. Currently it is providing URLS that look like this /wall-series-wine-racks-c-130_58_85/le-rustique-p-1657.htm I am wondering if there is a way to change the underscores (in the c-130_58_85) to dashes/hyphens. Do I use a PCRE rule, and if so which one? Or do I turn off the Generate CPath?
That's as I expected. Thank you for the information. My boss has been using an SEO Site Audit tool that complains about the underscores (because Google might interpret those incorrectly as part of a word) Since it's cPath data it really doesn't matter in terms of SEO effectiveness.
I've just submitted v3.0.5 of USU to the Zen Cart moderators for review; I'll post back when it's available for download: https://www.zen-cart.com/downloads.php?do=file&id=132
This release contains changes associated with the following GitHub issues:
#32: Strip unwanted &'s from the generated href_link.
#34: Correct admin PHP warnings when creating storefront links.
I successfully installed without any problems.
What parameter do I need to do to set to get my links to look like this?
From: http://yoursite.com/index.php?main_page=contact_us
To: http://yoursite.com/contact_us.html
Configuration->Ultimate URLs->Enable alternate URLs? Yes
When i try to navigate the catalog i get various errors relating to not being able to find files.
I suspect that cause is related to .htaccess. I am running on a Sietground hosting service. Could you give me any guidance what might need to be changed to resolve the problem.
The .htaccess in the root looks like this: one line
#AddHandler application/x-httpd-php70 .php .php5 .php4 .php3
The .htaccess in the public_html:
RewriteCond %{HTTP_HOST} ^tennesseeflyfishing\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.tennesseeflyfishing\.com$
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^/?$ "http\:\/\/tennesseeflyfishers\.org" [R=301,L]
#Weebly Additions Start
ErrorDocument 404 /w_api/Handler.php
RewriteEngine on
RewriteCond %{HTTP_HOST} !^tennesseetraditionalflies.com [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTPS}:s (on:(s)|off:s)
RewriteRule ^/?(.*) http%2://tennesseetraditionalflies\.com/$1 [L,R=301,NE]
Options
RewriteEngine on
RewriteCond %{REQUEST_URI} !-f
RewriteRule ^ajax/(.*)$ /w_api/Handler.php [L]
RewriteBase /
RewriteRule ^$ index.html [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /w_api/Handler.php
#Weebly Additions End
No idea whether you did that right or not, but it does go before the mod code in the file.
When I set Enable Alternate URL's in the Ultimate URL's under Configuration to Yes I get Page Not Found when I navigate to a page.
Attachment 18981
@jodean, have you updated the site's root .htaccess to include the rewrite rules provided in the .htaccess file provided in the root directory of the plugin's distribution?
Yes, the .htaccess in the download has been included in the sites public_html root directory.
RewriteEngine on
RewriteBase /shop/
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]
The .htaccess code needed to be at the website level not the public_html level.
is there any way to exclude the code -c-13_49_55 from the generated url?
https://tennesseetraditionalflies.co...es-c-13_49_55/
I have just installed this on my site, Zen Cart 1.5.5f, copied the files over and merged the htaccess to the below. It shows up in the admin as installed, and I am able to set rewrite the urls to true, but nothing changes on the site, the urls are all still the same as before.
My site is https://television.show any help appreciated.
Here is my htaccess, in the root folder, where the site is:
###############################################################################
# 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
###############################################################################
# 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 we 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
# already have it enabled for you, but if your rewrite rules are not working
# you can un-comment the first directive below to manually enable the option.
#
# 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
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.
###############################################################################
###############################################################################
# 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.
###############################################################################
#Force non-www:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.television\.show [NC]
RewriteRule ^(.*)$ http://television.show/$1 [L,R=301]
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php56” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-ea-php56 .php .php5 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
If it helps I have the error log on and it gives this:
=====> URL Generation Log Started, for page: /my-admin/configuration.php?gID=55&cID=753.
Request sent to href_link('index', '', 'NONSSL', true, true, false, true)
Generated URL: http://television.show/
Request sent to href_link('index', '', 'NONSSL', true, true, false, true)
Generated URL: http://television.show/
To follow on with this, I have this morning spent a while triple checking that every file is in exactly the correct place, and I have tried various changes with the htaccess file, removing the old parts from my original file, and replacing them and nothing seems to make any difference, I never get any re-written URLS... the module said it was installed, and it is switched on in the admin.. the site was a new install and has had no previous versions installed... would appreciate any help.
As another update I get that same log in the error log everytime I log into the admin, or try to make any changes to the module.
Thanks for your help and response...No there is not... however I switched on
Enable automatic redirects?
This will activate the automatic redirect code and send 301 headers for old to new URLs.
To true... the site already had products listed etc... so did I need to put that on? The links on the site still use the old URLS, but when clicked go to the new URLS....
Enabling automatic redirects will help with the site's SEO, given that the 'old' URLs might be bookmarked by customers and/or search engines.
You'll need to check your Template Monster template's tpl_modules_featured_products.php, tpl_modules_specials_default.php and whatever script is creating that Categories mega-menu as it appears that the associated code is not using the zen_href_link function to create those product/category links.
v1.5.5f php7.1
Hi Cindy,
I am trying to update from v2.215 to v3.0.6 without success. Following your installation instructions in the readme I deleted all files associated with the 2.215 version of the plugin and deleted all tables in configuration_group and configuration in the database (v2.215 doesn't have an uninstall.sql file and the uploading of the two files in the 'uninstall folder' didn't appear to work) - so I thought manually deleting the tables was the next best thing to do.
So deleting all files and the DB tables resulted in a blank white screen for both admin and store. Uploading installation files for 3.0.6 didn't retrieve admin (so couldn't complete installation) nor store - both remained blank. As the plugin doesn't overwrite any ZC core files I'm at a loss to know what went wrong?
I did this upgrade attempt on a live site - fortunately I had a full backup and am now back to where I was.
I am now going to make a copy of my site and attempt an upgrade on that site copy .... before i do, do you have any suggestions as to how I should go about it given that there is no uninstall.sql file for 2.215? ... is attempting an upgrade all the way to 3.0.6 'a bridge too far'?
Al I really need is for the canonical issue to work - that was fixed on v3.0.0 right? should I just try upgrading to 3.0.0?
cheers,
Mike
so with installation the .htaccess file will overwrite the existing file in the root right? - so domain redirections (non www to www to force https etc) (not usu) will be lost, right? so I assume immediately after upgrading that those redirects need to be pasted into the new .htaccess file?
Mike, the issues surrounding a USU upgrade from a version that old are normally making sure that (a) all the configuration-related bits are removed from the database and (b) that the core-file changes by those previous versions are also removed.
Make sure that that old version of USU doesn't provide files in the [/ADMIN]/includes/init_includes/overrides sub-directories. Use the Zen Cart "Developers' Tool Kit" to search for all occurrences of USU and SEO in all admin/storefront files.
For the changes to the .htaccess, I'd copy the block of rewrites from that provided by the USU distribution and paste that block into your current .htaccess (after any 'Deny' processing). That way, you keep all your non-www-to-www and force-https directives (as well as the Deny's) and just apply the update that's required for USU to do its thing.
Hey guys & gals,
I am currently on cart v1.5.4 and previous to that version I installed Ultimate Urls 2.15. I have several issues that I want to fix by doing an upgrade but have a few questions. Right now the admin page for 2.15 is not shown under configuration but I can access it by manually entering the id number in the configuration url (/configuration.php?gID=35) to get to it. With that said I also use the DPU 3.2.0 price updater plugin to calculate prices on the fly as my products have setup charges plus running charges and DPU displays 1 price on the product page. The problem is (and I didn't realize this until this week) is that while all of my .php product pages correctly display the price using the DPU price updater, the html version of the same pages does not display the price and the gif spins constantly as if it is working but the price never displays. Somehow I missed this error when I originally installed the 2.15 plugin and I wonder how many customers & orders I have lost because of them landing on the non functioning html pages.
My questions are:
1. Can the newest version DPU correctly display prices on the html versions?
2. Can the newest Ultimate Urls allow the DPU 3.2.0 I am currently using to display the prices correctly on the html version pages?
3. To upgrade the 2.15 to the current version is it just a matter of uninstalling all the old/original Ultimate Urls files installed (readme wasn't crystal clear to me) then proceed with the new version?
Thanks,
John
Noting, first, that the current version of USU (v3.0.6) supports Zen Cart versions 1.5.5 and later. There are 'significant' notifiers built into that and later versions of Zen Cart that enable the plugin to be drop-in.
Updating USU from one of its v2 flavors is messy, but documented here: https://github.com/lat9/usu/blob/mas...ade_from_v2.md. It's probably best, from a database-configuration standpoint, to run the v2 uninstall.sql and then re-install so that the database settings are proper. You'll also need to review the files 'delivered' by the version you're using (v2.215) so that you can remove its 'new' files and back out any core/template-file changes required by that older version.
Hi,
I have just downloaded the add-on and I’m very impressed at how easy it is to install and how well it works.
While testing the add-on I appear to have found a small issue on categories containing more than 10 products.
On a new Zencart install (1.5.7) I have installed this add-on and noticed the following:
The demo products pre-installed on the cart have a category (called Test Examples) with 16 products. With the standard settings this splits the products into two pages. These pages have the following URLs and canonical links:
Page 1 url in browser bar: example-website-com/test-examples-c-23/
Page 1 Canonical link: example-website-com/test-examples-c-23/
Page 2 url in browser bar: example-website-com/test-examples-c-23/?sort=20a&page=2
Page 2 Canonical link: example-website-com/test-examples-c-23/?page=2
When navigating from page 2 back to page 1 (using the [Prev] button) I have noticed that an alternative url is displayed (please see below).
Alternative Page 1 url in browser bar: example-website-com/test-examples-c-23/?sort=20a&page=1
Alternative Page 1 Canonical link: example-website-com/test-examples-c-23/?page=1
I would be very grateful if someone can look into the two issues:
1) The canonical link should be identical to the url in the browser bar (ideally the url would be rewritten to remove the sort=20a from the browser bar)
2) There should only be one canonical link for page 1 – the ‘alternative’ canonical link which has ?page=1 added on the end appears to be duplicate content.
Any help with these issues would be much appreciated.
Many thanks.
Richard
Richard, thanks for the report. I'll give it a look later today or in the morning.
I am confused. The download is for 3.0.6 but the support thread is for Ultimate SEO 2.200. Can anyone clear up the confusion?
Zen Cart bug-report created: https://www.zen-cart.com/showthread....47#post1372447
There's something in the base Zen Cart processing of the canonical link that now 'keeps' that page= parameter.
I love this plugin! Thank you for writing it.
I've got a fast question that I'm sure has been asked before, but I can't seem to find the answer.
Can I change the underscores to dashes?
https://joshuatreemugco.com/mugs-c-3...ic-sayings-c-3_92/go-ahead-poke-the-bear-mug-p-266.html
Erick
I didn't write USU, but I've been maintaining the plugin for the past few years.
You can, but it will take a lot of work. USU builds on Zen Cart's cPath display (which requires underscores to separate the category-tree).
... arse.
I didn't feel that the USU-v3 warranted its own support thread, since there's a fair amount of history in this one. Noting that the "Support Thread" link in the plugin's download page (https://www.zen-cart.com/downloads.php?do=file&id=132) points to this thread!
I have been using Ultimate URLs for years we have a problem that i need to find a solution for. I have been using zencart 1.5.6c Ultimate URLs v3.0.2 I just updated to Ultimate URLs v3.0.6 no change specials page still doesn't work . The specials.html has problems when I turn on a product on specials page the URL is a something like (http://www.website/_info.html?cPath=...products_id=85) I get a 404 Error broken path URL. Ultimate URL is not rewriting the URLs on the specials page, it works for all other Zen cart pages except the specials page. Is there a trick to get the specials page items to display a valid URL correctly? I don't want to have to build custom HTML page and have to redirect the specials page to a custom HTML page.
Thanks
That Marcus template can be pretty intrusive, overwriting many of Zen Cart's core files. None of the other plugins that you mention should have any 'play' in the issue.
Are there changes made to the as-shipped version of /includes/functions/html_output.php's zen_href_link function? That's what USU ties into to perform its URL modification 'magic'.
Working on a site with an older version of USU (2.215). Just noticed that the messageStack gets clobbered when USU is on (works fine when it's off). Has anyone else noticed this? Is it fixed in the latest USU?
Ah sorry. 1.5.7 is the cart version.
I'll suggest going down a remove-then-reinstall path. That old version of USU has some very unfriendly installation elements and many times, the upgrade to the current version gets bogged down with those remnants. The current version of USU works just fine with zc156 and later.
Documentation link for upgrading from USU v2 to v3: https://github.com/lat9/usu/blob/mas...ade_from_v2.md
I've just submitted v3.0.7 for the Zen Cart moderators' review; I'll post back here when it's available for download.
This release contains changes associated with the following GitHub issues:
#36: Refactor to use zen_get_products_name when gathering a product's name
#37: Refactoring to prevent PHP notices.
#38: Correcting PHP notices for malformed URLs.
#39: Corrections for PHP 8.0 compatibility.
Now available for download: https://www.zen-cart.com/downloads.php?do=file&id=132
Just installed last version on 1.5.7b
Is it normal to get log files long about 2500-3000 lines, got about 50 files for the catalog, and 30 for the admin side.
The admin basically are few lines, haven' checked all logs, but a few, and the are the same
The catalog ones are like said very large.Code:=====> URL Generation Log Started, for page: /afa-zen-157-b-amaama/aadmin/index.php?cmd=configuration&gID=32&cID=641.
Request sent to href_link('index', '', 'NONSSL', true, true, false, true)
Generated URL: http://localhost/afa-zen-157-b-amaama/
Request sent to href_link('index', '', 'NONSSL', true, true, false, true)
Generated URL: http://localhost/afa-zen-157-b-amaama/
it is normal if you have enable debug log set to true.
set that to false, and the logs will stop.
admin -> configuration -> ultimate URLs -> enable debug log
Thank you
Didn't think of it, I had set it to true in case of problems ... and that was the problem?! ;)
Hello zenniac seo url'ers,
I have updated zen to 1.5.7c today, and have noticed that it broke usu.php in admin/includes/functions/extra_functions/usu.php
That file invokes a call to zen_product_in_parent_category(), but this does not exist in its paths.
I had to add it to usu.php (and moved it to general.php) to make the categories/products area work in the admin.
Did I perhaps miss an updatee to admin general.php that defined this function for usu.php to call?
That's a function that is/was missing from the Zen Cart V1.5.7 includes/functions/functions_categories.php.
https://github.com/zencart/zencart/b....php#L231-L258
Code:function zen_product_in_category($product_id, $cat_id) { global $db;
$in_cat=false;
$category_query_raw = "select categories_id from " . TABLE_PRODUCTS_TO_CATEGORIES . "
where products_id = '" . (int)$product_id . "'";
$category = $db->Execute($category_query_raw);
while (!$category->EOF) {
if ($category->fields['categories_id'] == $cat_id) $in_cat = true;
if (!$in_cat) {
$parent_categories_query = "select parent_id from " . TABLE_CATEGORIES . "
where categories_id = '" . $category->fields['categories_id'] . "'";
$parent_categories = $db->Execute($parent_categories_query);
//echo 'cat='.$category->fields['categories_id'].'#'. $cat_id;
while (!$parent_categories->EOF) {
if (($parent_categories->fields['parent_id'] !=0) ) {
if (!$in_cat) $in_cat = zen_product_in_parent_category($product_id, $cat_id, $parent_categories->fields['parent_id']);
}
$parent_categories->MoveNext();
}
}
$category->MoveNext();
}
return $in_cat;
}
I've created a GitHub issue (https://github.com/lat9/usu/issues/41) to track the changes needed for the issue identified by @CarolineBogart.
I've just submitted v3.0.8 of USU for the Zen Cart moderators' review; I'll post back here when it's available for download.
This release contains changes associated with GitHub issue #41 (Missing zen_product_in_parent_category during admin processing).
Now available for download: https://www.zen-cart.com/downloads.php?do=file&id=132
Thanks very much. The only change is to add the conditional function zen_product_in_parent_category? I did that so I think we're all set.
Hello, using plugin ver 3.0.8 on Z-C ver 1.5.5e.
Is there something I need to do for the alternate URLs to be generated? I switched Enable alternate URLs? = True, and am clicking through my site. I see no change in any of the URLs. Will the plugin "crawl" my site and gen the SEO friendly URLs?
Debug is turned on, and looking in the log, I'm seeing no errors, only a series of messages like this:
=====> URL Generation Log Started, for page: /<ADMIN_DIR>/configuration.php?gID=42&cID=1453&action=edit.
Request sent to href_link('index', '', 'NONSSL', true, true, false, true)
Generated URL: https://australianbakerycafe.com/
Request sent to href_link('index', '', 'NONSSL', true, true, false, true)
Generated URL: https://australianbakerycafe.com/
The only thing that changes in the messages is the bolded part and sometimes it is like so: gID=42&cID=1451. (no "&action=edit.")
Thanks.
About an hour later, I just got word that our site is down, with this message showing to customers:
The page isn’t redirecting properly
An error occurred during a connection to australianbakerycafe.com.
This problem can sometimes be caused by disabling or refusing to accept cookies.
Checking logs, I find no fatal errors, but this is a new one:
Request sent to href_link('checkout_process', '', 'SSL', true, true, false, true)
Page (checkout_process) was not in the list of pages to rewrite, URI not generated!
Which to me means that a URI was not generated as the checkout page was not included to be re-written. No biggie, I think, certainly not a reason for the whole site not to load.
If I click "Storefront" button in Admin, site opens fine (https://australianbakerycafe.com/ind...ain_page=index) Of course, visitors just type in the domain name, which results in the above error.
I set Enable alternate URLs = false, tried domain name along, no joy. Reverted the .htaccess to pre-install of plugin, and site comes back. Thus there must be something wrong with .htaccess.
You could post the contents of the site's .htaccess file for review.
Heres our .htaccess. All of those RewriteCond at the end must have been added by our hoster. Probably having to do with redirecting all of our parked domains to our main site.
# Use PHP5.6 as default
AddHandler application/x-httpd-ea-php56 .php
RewriteEngine on
# replace www.MYSITE.COM with your website address.
# be sure to add any extra paths required to locate the index.php
# then relocate this file to the root of your store's folders, and rename it as .htaccess
ErrorDocument 404 http://67.20.86.87/index.php?main_page=page_not_found
## USER IP BANNING
order allow,deny
Deny from .ru
Deny from 176.113.115.28
Deny from ##########.com
Deny from 76.17.213.71
Deny from 112.198.203.176
Deny from 218.213.143.11
Deny from .cn
Deny from .cn.net
Deny from .cn.com
Deny from 60.169
Deny from 60.166
Deny from 222.186
Deny from 60.169.77.2
Deny from 222.184
allow from all
AddType image/x-icon .ico
ExpiresActive On
ExpiresDefault "access plus 15 days"
ExpiresByType image/gif "access plus 30 days"
ExpiresByType image/png "access plus 30 days"
ExpiresByType image/jpg "access plus 30 days"
ExpiresByType image/x-icon "access plus 365 days"
ExpiresByType text/css "access plus 30 days"
# RewriteCond %{SERVER_PORT} 80
# RewriteRule ^(.*)$ https://australianbakery.com/$1 [R,L]
# RewriteCond %{HTTP_HOST} ^australianbakery.com [NC,OR]
# RewriteCond %{HTTP_HOST} ^www.australianbakerycafe.com [NC,OR]
# RewriteCond %{HTTP_HOST} ^australianbakerycafe.com [NC,OR]
# RewriteCond %{HTTP_HOST} ^www.australianbakery.com [NC]
# RewriteRule ^(.*)$ https://australianbakerycafe.com/$1 [L,R=301,NC]
RewriteCond %{HTTP_HOST} ^australianbakery.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.australianbakery.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.australianbakerycafe.com$ [NC]
#BEGIN##########___ADDED for Ultimate URLs v 3.0.8 for SEO plugin
RewriteRule ^index\.php$ - [L]
# 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]
#END####################_ADDED for Ultimate URLs v 3.0.8 for SEO plugin
RewriteRule ^/?$ "https\:\/\/australianbakerycafe\.com" [R=301,L]
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php73” package as the default “PHP” programming language.
<IfModule mime_module>
</IfModule>
# php -- END cPanel-generated handler, do not edit
RewriteCond %{HTTP_REFERER} !^http://aussiebakery.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://aussiebakery.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://aussiebakery.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://aussiebakery.org$ [NC]
RewriteCond %{HTTP_REFERER} !^http://aussiebakerycafe.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://aussiebakerycafe.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://aussiebakerycafe.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://aussiebakerycafe.org$ [NC]
RewriteCond %{HTTP_REFERER} !^http://aussiemeatpie.biz/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://aussiemeatpie.biz$ [NC]
RewriteCond %{HTTP_REFERER} !^http://aussiemeatpie.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://aussiemeatpie.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://aussiemeatpie.store/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://aussiemeatpie.store$ [NC]
RewriteCond %{HTTP_REFERER} !^http://aussiepies.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://aussiepies.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://australianbakery.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://australianbakery.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://australianbakery.info/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://australianbakery.info$ [NC]
RewriteCond %{HTTP_REFERER} !^http://australianbakery.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://australianbakery.org$ [NC]
RewriteCond %{HTTP_REFERER} !^http://australianbakery.store/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://australianbakery.store$ [NC]
RewriteCond %{HTTP_REFERER} !^http://australianbakerycafe.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://australianbakerycafe.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://dev.australianbakerycafe.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://dev.australianbakerycafe.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://greataustralianbakery.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://greataustralianbakery.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://greataustralianbakery.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://greataustralianbakery.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://greataustralianbakery.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://greataustralianbakery.org$ [NC]
RewriteCond %{HTTP_REFERER} !^http://mail.australianbakerycafe.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://mail.australianbakerycafe.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://meatpie.biz/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://meatpie.biz$ [NC]
RewriteCond %{HTTP_REFERER} !^http://meatpie.store/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://meatpie.store$ [NC]
RewriteCond %{HTTP_REFERER} !^http://thegreataustralianbakery.biz/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://thegreataustralianbakery.biz$ [NC]
RewriteCond %{HTTP_REFERER} !^http://thegreataustralianbakery.info/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://thegreataustralianbakery.info$ [NC]
RewriteCond %{HTTP_REFERER} !^http://thegreataustralianbakery.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://thegreataustralianbakery.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://thegreataustralianbakery.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://thegreataustralianbakery.org$ [NC]
RewriteCond %{HTTP_REFERER} !^http://thegreataustralianbakery.store/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://thegreataustralianbakery.store$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.aussiebakery.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.aussiebakery.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.aussiebakery.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.aussiebakery.org$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.aussiebakerycafe.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.aussiebakerycafe.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.aussiebakerycafe.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.aussiebakerycafe.org$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.aussiemeatpie.biz/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.aussiemeatpie.biz$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.aussiemeatpie.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.aussiemeatpie.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.aussiemeatpie.store/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.aussiemeatpie.store$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.aussiepies.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.aussiepies.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.australianbakery.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.australianbakery.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.australianbakery.info/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.australianbakery.info$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.australianbakery.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.australianbakery.org$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.australianbakery.store/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.australianbakery.store$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.australianbakerycafe.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.australianbakerycafe.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.dev.australianbakerycafe.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.dev.australianbakerycafe.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.greataustralianbakery.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.greataustralianbakery.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.greataustralianbakery.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.greataustralianbakery.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.greataustralianbakery.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.greataustralianbakery.org$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.mail.australianbakerycafe.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.mail.australianbakerycafe.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.meatpie.biz/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.meatpie.biz$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.meatpie.store/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.meatpie.store$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.thegreataustralianbakery.biz/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.thegreataustralianbakery.biz$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.thegreataustralianbakery.info/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.thegreataustralianbakery.info$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.thegreataustralianbakery.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.thegreataustralianbakery.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.thegreataustralianbakery.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.thegreataustralianbakery.org$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.thegreataustralianbakery.store/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.thegreataustralianbakery.store$ [NC]
RewriteCond %{HTTP_REFERER} !^https://aussiebakery.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://aussiebakery.net$ [NC]
RewriteCond %{HTTP_REFERER} !^https://aussiebakery.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://aussiebakery.org$ [NC]
RewriteCond %{HTTP_REFERER} !^https://aussiebakerycafe.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://aussiebakerycafe.net$ [NC]
RewriteCond %{HTTP_REFERER} !^https://aussiebakerycafe.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://aussiebakerycafe.org$ [NC]
RewriteCond %{HTTP_REFERER} !^https://aussiemeatpie.biz/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://aussiemeatpie.biz$ [NC]
RewriteCond %{HTTP_REFERER} !^https://aussiemeatpie.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://aussiemeatpie.net$ [NC]
RewriteCond %{HTTP_REFERER} !^https://aussiemeatpie.store/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://aussiemeatpie.store$ [NC]
RewriteCond %{HTTP_REFERER} !^https://aussiepies.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://aussiepies.net$ [NC]
RewriteCond %{HTTP_REFERER} !^https://australianbakery.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://australianbakery.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://australianbakery.info/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://australianbakery.info$ [NC]
RewriteCond %{HTTP_REFERER} !^https://australianbakery.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://australianbakery.org$ [NC]
RewriteCond %{HTTP_REFERER} !^https://australianbakery.store/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://australianbakery.store$ [NC]
RewriteCond %{HTTP_REFERER} !^https://australianbakerycafe.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://australianbakerycafe.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://dev.australianbakerycafe.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://dev.australianbakerycafe.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://greataustralianbakery.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://greataustralianbakery.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://greataustralianbakery.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://greataustralianbakery.net$ [NC]
RewriteCond %{HTTP_REFERER} !^https://greataustralianbakery.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://greataustralianbakery.org$ [NC]
RewriteCond %{HTTP_REFERER} !^https://mail.australianbakerycafe.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://mail.australianbakerycafe.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://meatpie.biz/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://meatpie.biz$ [NC]
RewriteCond %{HTTP_REFERER} !^https://meatpie.store/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://meatpie.store$ [NC]
RewriteCond %{HTTP_REFERER} !^https://thegreataustralianbakery.biz/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://thegreataustralianbakery.biz$ [NC]
RewriteCond %{HTTP_REFERER} !^https://thegreataustralianbakery.info/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://thegreataustralianbakery.info$ [NC]
RewriteCond %{HTTP_REFERER} !^https://thegreataustralianbakery.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://thegreataustralianbakery.net$ [NC]
RewriteCond %{HTTP_REFERER} !^https://thegreataustralianbakery.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://thegreataustralianbakery.org$ [NC]
RewriteCond %{HTTP_REFERER} !^https://thegreataustralianbakery.store/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://thegreataustralianbakery.store$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.aussiebakery.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.aussiebakery.net$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.aussiebakery.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.aussiebakery.org$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.aussiebakerycafe.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.aussiebakerycafe.net$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.aussiebakerycafe.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.aussiebakerycafe.org$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.aussiemeatpie.biz/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.aussiemeatpie.biz$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.aussiemeatpie.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.aussiemeatpie.net$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.aussiemeatpie.store/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.aussiemeatpie.store$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.aussiepies.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.aussiepies.net$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.australianbakery.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.australianbakery.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.australianbakery.info/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.australianbakery.info$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.australianbakery.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.australianbakery.org$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.australianbakery.store/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.australianbakery.store$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.australianbakerycafe.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.australianbakerycafe.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.dev.australianbakerycafe.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.dev.australianbakerycafe.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.greataustralianbakery.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.greataustralianbakery.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.greataustralianbakery.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.greataustralianbakery.net$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.greataustralianbakery.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.greataustralianbakery.org$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.mail.australianbakerycafe.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.mail.australianbakerycafe.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.meatpie.biz/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.meatpie.biz$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.meatpie.store/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.meatpie.store$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.thegreataustralianbakery.biz/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.thegreataustralianbakery.biz$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.thegreataustralianbakery.info/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.thegreataustralianbakery.info$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.thegreataustralianbakery.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.thegreataustralianbakery.net$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.thegreataustralianbakery.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.thegreataustralianbakery.org$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.thegreataustralianbakery.store/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.thegreataustralianbakery.store$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp|png|pdf)$ - [F,NC]
Hmmm, I did post it, but it's not showing up.
I'm unclear as to what the RewriteRules that follow the cPanel-generated PHP version ...
... but I think I see the issue. In this section
... the highlighted RewriteRule looks to be the final processing for the RewriteCond's at the top of that section. Do things get better if you move that back, i.e.Code:RewriteCond %{HTTP_HOST} ^australianbakery.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.australianbakery.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.australianbakerycafe.com$ [NC]
#BEGIN##########___ADDED for Ultimate URLs v 3.0.8 for SEO plugin
RewriteRule ^index\.php$ - [L]
# 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]
#END####################_ADDED for Ultimate URLs v 3.0.8 for SEO plugin
RewriteRule ^/?$ "https\:\/\/australianbakerycafe\.com" [R=301,L]
Code:RewriteCond %{HTTP_HOST} ^australianbakery.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.australianbakery.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.australianbakerycafe.com$ [NC]
RewriteRule ^/?$ "https\:\/\/australianbakerycafe\.com" [R=301,L]
#BEGIN##########___ADDED for Ultimate URLs v 3.0.8 for SEO plugin
RewriteRule ^index\.php$ - [L]
# 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]
#END####################_ADDED for Ultimate URLs v 3.0.8 for SEO plugin
Thanks lat9. I moved
RewriteRule ^/?$ "https\:\/\/australianbakerycafe\.com" [R=301,L] to be above the plugin rewrite rules
Then set Enable alternate URLs? = True (again, I assume this is how one enables the plugin)
Tried website in browser, got the original error message "This site isn't redirecting properly" and site will not load.
Cleared browser as well as plugin cache. Same error message. I have disabled plugin and reverted .htaccess to the original and site is back to loading normally.
As the error occured, this is all that showed up in usu-admin log files:
=====> URL Generation Log Started, for page: /<admin_directory>/orders.php?oID=21118&action=edit.
Request sent to href_link('index', '', 'NONSSL', true, true, false, true)
Generated URL: https://australianbakerycafe.com/
Request sent to href_link('index', '', 'NONSSL', true, true, false, true)
Generated URL: https://australianbakerycafe.com/
Greg, would you post the original .htaccess that works for comparison?
Hi Lat9, here you go. Thanks very much for your help! I would dearly like to get Ultimate URLs working on my site, but I sure can't have it bringing my site down ;-)
# Use PHP5.6 as default
AddHandler application/x-httpd-ea-php56 .php
RewriteEngine on
# replace www.MYSITE.COM with your website address.
# be sure to add any extra paths required to locate the index.php
# then relocate this file to the root of your store's folders, and rename it as .htaccess
ErrorDocument 404 http://67.20.86.87/index.php?main_page=page_not_found
## USER IP BANNING
order allow,deny
Deny from .ru
Deny from 176.113.115.28
Deny from ##########.com
Deny from 76.17.213.71
Deny from 112.198.203.176
Deny from 218.213.143.11
Deny from .cn
Deny from .cn.net
Deny from .cn.com
Deny from 60.169
Deny from 60.166
Deny from 222.186
Deny from 60.169.77.2
Deny from 222.184
allow from all
AddType image/x-icon .ico
ExpiresActive On
ExpiresDefault "access plus 15 days"
ExpiresByType image/gif "access plus 30 days"
ExpiresByType image/png "access plus 30 days"
ExpiresByType image/jpg "access plus 30 days"
ExpiresByType image/x-icon "access plus 365 days"
ExpiresByType text/css "access plus 30 days"
# RewriteCond %{SERVER_PORT} 80
# RewriteRule ^(.*)$ https://australianbakery.com/$1 [R,L]
# RewriteCond %{HTTP_HOST} ^australianbakery.com [NC,OR]
# RewriteCond %{HTTP_HOST} ^www.australianbakerycafe.com [NC,OR]
# RewriteCond %{HTTP_HOST} ^australianbakerycafe.com [NC,OR]
# RewriteCond %{HTTP_HOST} ^www.australianbakery.com [NC]
# RewriteRule ^(.*)$ https://australianbakerycafe.com/$1 [L,R=301,NC]
RewriteCond %{HTTP_HOST} ^australianbakery.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.australianbakery.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.australianbakerycafe.com$ [NC]
RewriteRule ^/?$ "https\:\/\/australianbakerycafe\.com" [R=301,L]
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php73” package as the default “PHP” programming language.
<IfModule mime_module>
</IfModule>
# php -- END cPanel-generated handler, do not edit
RewriteCond %{HTTP_REFERER} !^http://aussiebakery.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://aussiebakery.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://aussiebakery.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://aussiebakery.org$ [NC]
RewriteCond %{HTTP_REFERER} !^http://aussiebakerycafe.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://aussiebakerycafe.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://aussiebakerycafe.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://aussiebakerycafe.org$ [NC]
RewriteCond %{HTTP_REFERER} !^http://aussiemeatpie.biz/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://aussiemeatpie.biz$ [NC]
RewriteCond %{HTTP_REFERER} !^http://aussiemeatpie.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://aussiemeatpie.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://aussiemeatpie.store/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://aussiemeatpie.store$ [NC]
RewriteCond %{HTTP_REFERER} !^http://aussiepies.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://aussiepies.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://australianbakery.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://australianbakery.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://australianbakery.info/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://australianbakery.info$ [NC]
RewriteCond %{HTTP_REFERER} !^http://australianbakery.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://australianbakery.org$ [NC]
RewriteCond %{HTTP_REFERER} !^http://australianbakery.store/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://australianbakery.store$ [NC]
RewriteCond %{HTTP_REFERER} !^http://australianbakerycafe.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://australianbakerycafe.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://dev.australianbakerycafe.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://dev.australianbakerycafe.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://greataustralianbakery.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://greataustralianbakery.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://greataustralianbakery.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://greataustralianbakery.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://greataustralianbakery.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://greataustralianbakery.org$ [NC]
RewriteCond %{HTTP_REFERER} !^http://mail.australianbakerycafe.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://mail.australianbakerycafe.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://meatpie.biz/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://meatpie.biz$ [NC]
RewriteCond %{HTTP_REFERER} !^http://meatpie.store/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://meatpie.store$ [NC]
RewriteCond %{HTTP_REFERER} !^http://thegreataustralianbakery.biz/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://thegreataustralianbakery.biz$ [NC]
RewriteCond %{HTTP_REFERER} !^http://thegreataustralianbakery.info/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://thegreataustralianbakery.info$ [NC]
RewriteCond %{HTTP_REFERER} !^http://thegreataustralianbakery.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://thegreataustralianbakery.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://thegreataustralianbakery.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://thegreataustralianbakery.org$ [NC]
RewriteCond %{HTTP_REFERER} !^http://thegreataustralianbakery.store/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://thegreataustralianbakery.store$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.aussiebakery.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.aussiebakery.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.aussiebakery.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.aussiebakery.org$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.aussiebakerycafe.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.aussiebakerycafe.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.aussiebakerycafe.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.aussiebakerycafe.org$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.aussiemeatpie.biz/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.aussiemeatpie.biz$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.aussiemeatpie.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.aussiemeatpie.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.aussiemeatpie.store/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.aussiemeatpie.store$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.aussiepies.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.aussiepies.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.australianbakery.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.australianbakery.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.australianbakery.info/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.australianbakery.info$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.australianbakery.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.australianbakery.org$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.australianbakery.store/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.australianbakery.store$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.australianbakerycafe.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.australianbakerycafe.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.dev.australianbakerycafe.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.dev.australianbakerycafe.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.greataustralianbakery.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.greataustralianbakery.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.greataustralianbakery.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.greataustralianbakery.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.greataustralianbakery.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.greataustralianbakery.org$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.mail.australianbakerycafe.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.mail.australianbakerycafe.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.meatpie.biz/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.meatpie.biz$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.meatpie.store/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.meatpie.store$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.thegreataustralianbakery.biz/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.thegreataustralianbakery.biz$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.thegreataustralianbakery.info/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.thegreataustralianbakery.info$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.thegreataustralianbakery.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.thegreataustralianbakery.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.thegreataustralianbakery.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.thegreataustralianbakery.org$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.thegreataustralianbakery.store/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.thegreataustralianbakery.store$ [NC]
RewriteCond %{HTTP_REFERER} !^https://aussiebakery.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://aussiebakery.net$ [NC]
RewriteCond %{HTTP_REFERER} !^https://aussiebakery.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://aussiebakery.org$ [NC]
RewriteCond %{HTTP_REFERER} !^https://aussiebakerycafe.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://aussiebakerycafe.net$ [NC]
RewriteCond %{HTTP_REFERER} !^https://aussiebakerycafe.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://aussiebakerycafe.org$ [NC]
RewriteCond %{HTTP_REFERER} !^https://aussiemeatpie.biz/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://aussiemeatpie.biz$ [NC]
RewriteCond %{HTTP_REFERER} !^https://aussiemeatpie.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://aussiemeatpie.net$ [NC]
RewriteCond %{HTTP_REFERER} !^https://aussiemeatpie.store/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://aussiemeatpie.store$ [NC]
RewriteCond %{HTTP_REFERER} !^https://aussiepies.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://aussiepies.net$ [NC]
RewriteCond %{HTTP_REFERER} !^https://australianbakery.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://australianbakery.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://australianbakery.info/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://australianbakery.info$ [NC]
RewriteCond %{HTTP_REFERER} !^https://australianbakery.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://australianbakery.org$ [NC]
RewriteCond %{HTTP_REFERER} !^https://australianbakery.store/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://australianbakery.store$ [NC]
RewriteCond %{HTTP_REFERER} !^https://australianbakerycafe.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://australianbakerycafe.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://dev.australianbakerycafe.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://dev.australianbakerycafe.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://greataustralianbakery.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://greataustralianbakery.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://greataustralianbakery.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://greataustralianbakery.net$ [NC]
RewriteCond %{HTTP_REFERER} !^https://greataustralianbakery.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://greataustralianbakery.org$ [NC]
RewriteCond %{HTTP_REFERER} !^https://mail.australianbakerycafe.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://mail.australianbakerycafe.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://meatpie.biz/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://meatpie.biz$ [NC]
RewriteCond %{HTTP_REFERER} !^https://meatpie.store/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://meatpie.store$ [NC]
RewriteCond %{HTTP_REFERER} !^https://thegreataustralianbakery.biz/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://thegreataustralianbakery.biz$ [NC]
RewriteCond %{HTTP_REFERER} !^https://thegreataustralianbakery.info/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://thegreataustralianbakery.info$ [NC]
RewriteCond %{HTTP_REFERER} !^https://thegreataustralianbakery.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://thegreataustralianbakery.net$ [NC]
RewriteCond %{HTTP_REFERER} !^https://thegreataustralianbakery.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://thegreataustralianbakery.org$ [NC]
RewriteCond %{HTTP_REFERER} !^https://thegreataustralianbakery.store/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://thegreataustralianbakery.store$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.aussiebakery.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.aussiebakery.net$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.aussiebakery.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.aussiebakery.org$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.aussiebakerycafe.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.aussiebakerycafe.net$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.aussiebakerycafe.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.aussiebakerycafe.org$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.aussiemeatpie.biz/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.aussiemeatpie.biz$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.aussiemeatpie.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.aussiemeatpie.net$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.aussiemeatpie.store/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.aussiemeatpie.store$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.aussiepies.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.aussiepies.net$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.australianbakery.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.australianbakery.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.australianbakery.info/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.australianbakery.info$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.australianbakery.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.australianbakery.org$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.australianbakery.store/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.australianbakery.store$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.australianbakerycafe.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.australianbakerycafe.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.dev.australianbakerycafe.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.dev.australianbakerycafe.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.greataustralianbakery.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.greataustralianbakery.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.greataustralianbakery.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.greataustralianbakery.net$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.greataustralianbakery.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.greataustralianbakery.org$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.mail.australianbakerycafe.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.mail.australianbakerycafe.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.meatpie.biz/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.meatpie.biz$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.meatpie.store/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.meatpie.store$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.thegreataustralianbakery.biz/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.thegreataustralianbakery.biz$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.thegreataustralianbakery.info/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.thegreataustralianbakery.info$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.thegreataustralianbakery.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.thegreataustralianbakery.net$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.thegreataustralianbakery.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.thegreataustralianbakery.org$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.thegreataustralianbakery.store/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.thegreataustralianbakery.store$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp|png|pdf)$ - [F,NC]
I read a lot of advice about merging htaccess files which sounded very complex; in the end, I just added the SEO rules to the end of my current htaccess file and that works fine.
i agree that this is a good idea. here is what i would do:
- add the URL rules at the end of your working .htaccess file
- leave the enable SEO url set to off/false.
- ensure that your site is still working with the SEO set to off
- if it is not working, i would comment out this line by adding the '#' in front of it:
- #RewriteRule ^index\.php$ - [L]
- once the site is working with the modified .htaccess file, i would then start troubleshooting the rules part of it.
- i would see what happens with this url: https://australianbakerycafe.com/pie-p-185
apache directives can get complex... but this is how i would start to troubleshoot this problem.
best.
OK, marton_1 and carlwhat, I have done as you suggested:
First, I level set my Z-C. I removed all plugin files (I searched my entire Z-C for all "seo" and "usu" filenames and blew them out.) and by ensuring I had no trace of the plugin .htaccess rules in my live .htaccess. (had backed it up, before editing it)
I placed the plugin .htaccess rewrites at the end of my live .htaccess file.
I tested the site -- all worked without a hitch. Thus, marton_1's suggestion worked.
I then copied all plugin files to their appropriate folders. Retested site, all still fine (as expected, but providing full detail)
I then set Plugin debug log = true and enable alternate urls = true.
Again, testing site, I find all is fine. It continues to operate as before installation and activation.
However, I am seeing no difference in URLs. Its the same category and product format as before, i.e.
https://australianbakerycafe.com/ind...index&cPath=65
or
https://australianbakerycafe.com/ind...roducts_id=180
Carlwhat - direct entry of https://australianbakerycafe.com/pie-p-185 DOES, in fact, render the product, that the URL by way of site navigation to Steak and Onion Pie does,
https://australianbakerycafe.com/ind...roducts_id=185
But the . . . /pie-p-185 URL doesn't show up on my site. So I don't know how you came up with that URL for that pie.
In summary, the plugin is installed, .htaccess merged, activated, and my site is working fine (:clap:). But I do not see it rewriting any URLs.
http:\\australianbakery.com\Screenshot_20210217_143753.jpeg
Sounds good so far.
Did you check the logs?
Dh-oh, I meant to post one of those messages, too. Nothing extraordinary there. Yeah, good so far, in that my site is running fine, but I don't see what the plugin is doing for me.
=====> URL Generation Log Started, for page: /<admin_directory>/configuration.php?gID=43&cID=1477&action=edit.
Request sent to href_link('index', '', 'NONSSL', true, true, false, true)
Generated URL: https://australianbakerycafe.com/
Request sent to href_link('index', '', 'NONSSL', true, true, false, true)
Generated URL: https://australianbakerycafe.com/
i've been doing it longer than you? :P
we need to see how you have it configured now. your screenshot has the wrong permissions on the file. when i go to that link:Quote:
In summary, the plugin is installed, .htaccess merged, activated, and my site is working fine (:clap:). But I do not see it rewriting any URLs.
http:\\australianbakery.com\Screenshot_20210217_143753.jpeg
Attachment 19440
Shot of plugin config. All is default except I turned on debug log and activated.
Attachment 19441
Scritching my head mightily why its not working for me. What does your log usu-admin log look like?
Nothing untoward shows in my log:
=====> URL Generation Log Started, for page: /<admin_directory>/configuration.php?gID=43.
Request sent to href_link('index', '', 'NONSSL', true, true, false, true)
Generated URL: https://australianbakerycafe.com/
Request sent to href_link('index', '', 'NONSSL', true, true, false, true)
Generated URL: https://australianbakerycafe.com/
greg,
i have not looked at usu logs in a bit...
that said, i do not think we want to look at:
usu-admin-2021....
the logs we want to look at are:
usu-202102....
the admin side generates few links (i think...), but when we got to your store home, it should be generating various urls. for example, here is some of the log from a test site of mine:
lets look at stuff that has something like:Code:Params from $_GET: cPath=62
=====> URL Generation Log Started, for page: /burgundy-red-wine-aoc-62.
Request sent to href_link('index', 'cPath=62', 'SSL', false, true, false, true)
Parsing Parameters for index
array (
0 => 'cPath=62',
)
Generated URL: https://la155.com/burgundy-red-wine-aoc-62
NO REDIRECT: Alternative URI matched the requested URI.
Request sent to href_link('index', 'cPath=62&', 'SSL', false, true, false, true)
Parsing Parameters for index
array (
0 => 'cPath=62',
)
Generated URL: https://la155.com/burgundy-red-wine-aoc-62
Request sent to href_link('index', '', 'NONSSL', true, true, false, true)
Generated URL: https://la155.com/
Request sent to href_link('index', 'cPath=62', 'NONSSL', true, true, false, true)
Parsing Parameters for index
array (
0 => 'cPath=62',
)
Generated URL: https://la155.com/burgundy-red-wine-aoc-62
Request sent to href_link('login', '', 'SSL', true, true, false, true)
Generated URL: https://la155.com/login
Request sent to href_link('index', '', 'NONSSL', true, true, false, true)
Generated URL: https://la155.com/
Request sent to href_link('index', 'cPath=62&', 'SSL', false, true, false, true)
that is a category link.
not real sure what is going on; but having the .htaccess resolved lets us get focused on the usu or link generation part of it.
once we figure this out, i need some steak, bacon and cheese pies sent my way! (:P kidding....)
best.
Thanks Carl,
1) First, usu-adm vs usu- To clarify, I mistyped "usu-admin" I meant "usu-adm"
All I HAVE is usu-adm-YYYYmmmdd-<timestamp>.log files. Note that this is the format described in the plugin debug logging config: (usu-{adm-}yyyymmmdd-hhmmss.log)
I do not have any usu-YYYYmmmdd.....log files. You, OTOH, apparently have usu-YYYYmmmdd . . . . log files. I wonder if this is a significant clue to what's wrong?
2) What you show me in your log is very interesting and revealing! Yours show an actual product rewrite occurring (Burgundy red). Your log is much "busier". In contrast, my logs only ever show the root of the website, which, BTW, there's no difference between the two lines:
Request sent to href_link('index', '', 'NONSSL', true, true, false, true)
Generated URL: https://australianbakerycafe.com/
Request sent to href_link('index', '', 'NONSSL', true, true, false, true)
Generated URL: https://australianbakerycafe.com/
I can browse around all my categories and products, but nothing else shows up in my debug logs. In fact NO debug logs are generated unless I browse around in my Admin. :huh:
greg,
i want my pies! :P
the adm part of the log name is optional and would indicate URLs generated from the admin side of your site.
with regards to the fact that you have no log files without the adm in the name, yes it is clue.... yes a significant one at that!
i think you did not install the storefront includes portion of the plugin... my guess!
does this file exist:
/YOUR_STORE_ROOT/includes/auto_loaders/config.usu.php
there are 2 directories to copy; one for the admin and one for the store front.
re-read the installation directions and ensure that you did it all and you did it properly. i think that is where the problem lies.
best.
Sorry to disappoint you, Carl
Yes, that file exists. As do all 11 usu and seo files which should be in the /includes tree.
After I started over, doing a complete fresh install of the plugin I methodically ftp'd directory-by-directory all files into their respective directories. BTW, by fresh install, I mean install of THIS version of the plugin -- I did not have an earlier version.
You gotta work harder for your pies than that, mate! :D
In the readme of the plugin there is a Plugin File List. It shows only 5 files in the /includes tree and 11 in the /admin tree, see below. However, having done a search of those two hierarchies in the the .zip file, I find 11 and 21 respectively. It seems the readme needs to be updated.
.htaccess
/includes/auto_loaders/config.usu.php
/includes/classes/usu.php
/includes/classes/observers/UsuObserver.php
/includes/extra_datafiles/usu.php
/includes/init_includes/init_usu.php
/YOUR_ADMIN/usu_uninstall.php
/YOUR_ADMIN/includes/auto_loaders/config.usu.php
/YOUR_ADMIN/includes/classes/observers/UsuAdminObserver.php
/YOUR_ADMIN/includes/extra_datafiles/usu.php
/YOUR_ADMIN/includes/functions/extra_functions/usu.php
/YOUR_ADMIN/includes/init_includes/init_usu_admin.php
/YOUR_ADMIN/includes/init_includes/init_usu_admin_install.php
/YOUR_ADMIN/includes/init_includes/init_usu_admin_update.php
/YOUR_ADMIN/includes/init_includes/init_usu_admin_update_from_ultimate_seo.php
/YOUR_ADMIN/includes/languages/english/usu_configuration.php
/YOUR_ADMIN/includes/languages/english/usu_uninstall.php
/YOUR_ADMIN/includes/languages/english/extra_definitions/usu.php
The readme doesn't track the 'overwrite' files for older versions of USU and its SEO versions.
You can use your admin's Tools :: Developer's Toolkit to see that the database constant USU_ENABLED is, in fact, not set to false.
Make sure, too, that your site's /includes/functions/html_output.php's zen_href_link function includes the highlighted notification:
Without that notification, USU won't be 'in play'.Code:/*
* The HTML href link wrapper function
*/
function zen_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true, $static = false, $use_dir_ws_catalog = true) {
global $request_type, $session_started, $http_domain, $https_domain, $zco_notifier;
$link = null;
$zco_notifier->notify('NOTIFY_SEFU_INTERCEPT', array(), $link, $page, $parameters, $connection, $add_session_id, $static, $use_dir_ws_catalog);
if($link !== null) return $link;
Hi Lat!
1) I searched USU_ENABLED, found 5 hits, this being the only one mentioning 'false'
/OBFUSCATE/OBFUSCATE/public_html/includes/classes/usu.php
Line # 139 : if (!defined('USU_ENABLED') || USU_ENABLED == 'false') {
2) Missing from /includes/functions/html_output.php, so added where you indicated.
$zco_notifier->notify('NOTIFY_SEFU_INTERCEPT', array(), $link, $page, $parameters, $connection, $add_session_id, $static, $use_dir_ws_catalog);
if($link !== null) return $link;
Website went down. Nothing loads. Changes 'false' above to 'true' in usu.php. Refreshed browser -- site still down.
Reverted to 'false' and removed notification code. Site is restored to normal operation.
My zen_href_link function is different from yours, see below:
Mine
function zen_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true, $static = false, $use_dir_ws_catalog = true) {
global $request_type, $session_started, $http_domain, $https_domain;
Yours
function zen_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true, $static = false, $use_dir_ws_catalog = true) {
global $request_type, $session_started, $http_domain, $https_domain, $zco_notifier;
re-inserted
$zco_notifier->notify('NOTIFY_SEFU_INTERCEPT', array(), $link, $page, $parameters, $connection, $add_session_id, $static, $use_dir_ws_catalog);
if($link !== null) return $link;
AND added $zco_notifier to end of function. Refreshed browser - site's still up AND, URLS are being re-written! :clap:
Running thru all my categories, and some of my products (we have hundreds) and URLs are looking pretty good. I hate to quibble after all the progress made. Thanks so much, guys!
But . . .
My categories look like so:
https://australianbakerycafe.com/pie...ge-rolls-c-65/
and my products look like so:
https://australianbakerycafe.com/pie...4pk-p-186.html
Is there any way to clean this up, eliminating category number and product number, thusly?
https://australianbakerycafe.com/pies-sausage-rolls/
https://australianbakerycafe.com/pie...n-pie-4pk.html
Hang on -- PCRE rules . . mentions regex....maybe I can do a regex replace of -c-## and -p-### ???
oh, oh, oh.... i see how it is... running v1.5.5e.... hmm.....
https://github.com/zencart/zencart/b...output.php#L17
that notifier is been there for 6 years.... hmmm... wonder who did your upgrade? :p
glad you got it working!
with regards to your question on elimination of product and/or category numbers, in a word no.
it would require a rewrite to the point that it would be a whole new plugin. probably a new database table.... but not part of this plugin.
best.
ps #gluten4punishment
Just to add emphasis to @carlwhat's statement. Rather than relying on additional database tables to map those "pretty" URLs to their respective homes, that cryptic -c-, -p- and (for EZ-pages) -e- designation identifies the associated 'id' to use to find the page requested. Remove those and USU won't be able to do its thing.
Thanks Carl and Lat for the guidance on the -c- and -p-. I'm very happy with the improvement in human (and crawler ) meaningful URLs. Now I need to get goog and others to re-index my new URLs.
I do know I need to upgrade my site and php version. Just got to pick the right Z-C responsive template from the ones offered here. Ain't gonna make the TemplateMonster mistake again!
best to both of you,
Greg
Wondering if anyone can help.
I've been using this add-onn for as long as I can remember & never had an issue.
Last year after a long migration process we upgraded from a fairly old version of ZC to the then current 1.5.6c. Everything went fine with the upgrade and the site has been working well. This last month Google has started highlighting redirect loop errors for deleted products. After having a dig through the settings, it would appear that if I enable automatic rewrites in utlimate URLS & then try to visit the url for a now deleted product, it will fire a redirect loop in firefox. This confirms the behaviour I'm seeing in search console.
if I disable automatic rewrites, the "sorry, product not found" page will show and after a 302 redirect will show a 404 header.
I've used the automatic redirects in ultimate urls for years & never noticed a problem, but for some reason it is now not playing ball. I don't know where to start. My .htaccess is the same as when it did work on the older version of Zen Cart. I've compared the two and all ultimate URLS rewrites are present & correct. For now I've disabled automatic rewrites & will let google uses the canonical/nofollows generated by zen cart. The changes include the newer version of ZC & now running on php 7.3.27
Can anyone point me in the right direction? I tried uninstaling ultimate URLS completely & have freshly installed version 3.0.8 from numinix website. Still can't get it to work as expected. Any help would be greatly appreciated.
Thanks, John.