zennedOut
- Join Date:
- Nov 2005
- Location:
- los angeles
- Posts:
- 2,969
- Plugin Contributions:
- 8
Ultimate SEO v3 (and v2.200) [Support Thread]
i would look at the complete htaccess file.
i think it could be a question of the ordering of the rules there.
Views: 429,543
zennedOut
i would look at the complete htaccess file.
i think it could be a question of the ordering of the rules there.
Administrator
carlwhat:
i would look at the complete htaccess file.
i think it could be a question of the ordering of the rules there.
Agreed, but the rules posted by the OP are part of the as-shipped USU .htaccess.
New Zenner
I will check the the debug log. Here is one of my old url links from pinterest for an example: https://enchantedcottageshop.com/shop/mirrors/convex-wall-mirror-15-round-gold-framed-antique-vintage-style
New Zenner
Today's debug log: [14-Dec-2024 07:14:36 UTC] Request URI: /shop/index.php?main_page=unsubscribe&action=unsubscribe, IP address: 80.85.245.241, Language id 1
#1 require(/home/enchant1/public_html/shop/includes/modules/pages/unsubscribe/header_php.php) called at [/home/enchant1/public_html/shop/index.php:35]
--> PHP Warning: Undefined array key "addr" in /home/enchant1/public_html/shop/includes/modules/pages/unsubscribe/header_php.php on line 29.
New Zenner
I also noticed that my code to block bots in the .htaccess file is no longer blocking them :( I will rearrange the order of coding to see if that makes a difference. As of now, my codes are after Ultimate SEO's codes in the file. I will put my codes first to see if that makes a difference.
New Zenner
The url redirect code at the beginning causes the Ultimate SEO not to work but it works fine with the bot block coding in the beginning. I will have to wait and see if the bots will be blocked, I sure hope so.
Administrator
enchanted1:
Today's debug log: [14-Dec-2024 07:14:36 UTC] Request URI: /shop/index.php?main_page=unsubscribe&action=unsubscribe, IP address: 80.85.245.241, Language id 1
#1 require(/home/enchant1/public_html/shop/includes/modules/pages/unsubscribe/header_php.php) called at [/home/enchant1/public_html/shop/index.php:35]
--> PHP Warning: Undefined array key "addr" in /home/enchant1/public_html/shop/includes/modules/pages/unsubscribe/header_php.php on line 29.
That's got nothing to do with USU; it's something in the Zen Cart base.
New Zenner
The bots are not being blocked anymore because they accessed my site today. So my old urls were redirecting and bots were being blocked before the ultimate seo plugin. I wish I was smart with coding, I don't understand why the ultimate seo codes in .htaccess are causing my redirecting codes and bot block codes not to work :dontgetit
Administrator
enchanted1:
The bots are not being blocked anymore because they accessed my site today. So my old urls were redirecting and bots were being blocked before the ultimate seo plugin. I wish I was smart with coding, I don't understand why the ultimate seo codes in .htaccess are causing my redirecting codes and bot block codes not to work :dontgetit
If, as @carlwhat suggested a couple of posts ago, you'd post the full contents of the .htaccess file (use the "CODE" tags, the big **# **in the menu bar) that would give us something to comment on.
New Zenner
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} (crawl|AhrefsBot|SemrushBot) [NC]
RewriteRule .* - [F,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]
RewriteRule ^(.*)-c-([0-9_]+)/(.*)-prw-([0-9]+)(.*)$ index\.php?main_page=product_reviews_write&products_id=$4&cPath=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-c-([0-9_]+)/(.*)-aaq-([0-9]+)(.*)$ index\.php?main_page=ask_a_question&pid=$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 ^(.*)-prw-([0-9]+)(.*)$ index\.php?main_page=product_reviews_write&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-aaq-([0-9]+)(.*)$ index\.php?main_page=ask_a_question&pid=$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]
New Zenner
So I'm guessing nothing looks wrong in the coding? :lookaroun
Administrator
Except for the user-agent rule and the one that follows, that's as-shipped USU.
I'm just not sure how this rule is going to affect the overall rewrites:
RewriteRule .* - [F,L]
Zen Follower
lat9:
RewriteRule .* - [F,L]
This will return a 403 forbidden error to the client.
The Dot (.) in regex means any character; Dot Star (.*) means 0 or more of any character; F = Forbidden; L = last and stop processing the rule set
OldNGrey
ZC222 PHP 8.4.16
MySQL 11.8.5-MariaDB
New Zenner
Just an FYI, I put the bot blocking code at the top of the .htaccess in my shop folder and also added it to the .htaccess in the public_html folder. They are now being blocked.
Totally Zenned
Is it possible to customize the URLs generated by the Ultimate SEO module? For example, instead of default URLs like 'page 2', 'page 3', and 'page 4', I’d like to assign specific, descriptive names that reflect the content of each page.
This could potentially be achieved by introducing a custom mapping file, such as:
return [
'page_2' => 'faq',
'page_3' => 'wholesale',
'page_4' => 'services',
];
The module could reference this file during URL generation and, if a custom name is defined, use it instead of the default. This approach would retain existing functionality for undefined pages while offering greater flexibility for SEO and user-friendly URLs.
marcopolo
Zen Cart 2.2.2 | PHP 8.5.11 | MariaDB 10.11.14
Administrator
marcopolo:
Is it possible to customize the URLs generated by the Ultimate SEO module? For example, instead of default URLs like 'page 2', 'page 3', and 'page 4', I’d like to assign specific, descriptive names that reflect the content of each page.
This could potentially be achieved by introducing a custom mapping file, such as:
return [
'page_2' => 'faq',
'page_3' => 'wholesale',
'page_4' => 'services',
];
>
> The module could reference this file during URL generation and, if a custom name is defined, use it instead of the default. This approach would retain existing functionality for undefined pages while offering greater flexibility for SEO and user-friendly URLs.
I've created a GitHub issue (<https://github.com/lat9/usu/issues/60>) to record your request.
Administrator
v3.1.2 of USU is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=132
This version contains the correction for GitHub issue #59 (Undefined variable $value_pair)
Totally Zenned
Is there a way to quickly get the URI of a given category?
Administrator
retched:
Is there a way to quickly get the URI of a given category?
Off the top of my head (so let me know if it doesn't work):
zen_href_link(FILENAME_DEFAULT, 'cPath=' . $categories_id);
Totally Zenned
lat9:
Off the top of my head (so let me know if it doesn't work):
zen_href_link(FILENAME_DEFAULT, 'cPath=' . $categories_id);
That did it!
Tell staff why this post should be reviewed.