Jump to content
spidometrs

[CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo

Recommended Posts

That's done it Jack, thank you.

 

Commented out Options +FollowSymLinks. Do I need Options +SymLinksIfOwnerMatch ?

 

Martin


OsC 2.3.4.1 CE Frozen   PHP 7.2   MySQL 10.1.36-MariaDB-cll-lve. Phoenix in development

Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix 1.0.2.0) here.

Share this post


Link to post
Share on other sites

Hello.

 

I've just installed this add-on yet my shop isn't loading at all.

I can get to the admin panel but there is no "Configuration => Seo urls" as was mentionend in some readme file

 

My shop is in a subdirectory /osc-shop/

 

Here's the htaccess file:

# Begin Ultimate SEO V2.2d
Options +FollowSymLinks
RewriteEngine On
# RewriteBase instructions
# Change RewriteBase dependent on how your shop is accessed as below.
# http://www.mysite.com = RewriteBase /
# http://www.mysite.com/catalog/ = RewriteBase /catalog/
# http://www.mysite.com/catalog/shop/ = RewriteBase /catalog/shop/
# Change the following line using the instructions above

RewriteBase /osc-shop/
RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-m-(.*).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pi-(.*).html$ popup_image.php?pID=$2&%{QUERY_STRING}
RewriteRule ^(.*)-by-(.*).html$ all-products.php?fl=$2&%{QUERY_STRING}
RewriteRule ^(.*)-t-(.*).html$ articles.php?tPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-a-(.*).html$ article_info.php?articles_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-au-(.*).html$ articles.php?authors_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pr-(.*).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pri-(.*).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-f-(.*).html$ faqdesk_info.php?faqdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-fc-(.*).html$ faqdesk_index.php?faqPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-fri-(.*).html$ faqdesk_reviews_info.php?faqdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-fra-(.*).html$ faqdesk_reviews_article.php?faqdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-i-(.*).html$ information.php?info_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-links-(.*).html$ links.php?lPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pm-([0-9]+).html$ info_pages.php?pages_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-n-(.*).html$ newsdesk_info.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nc-(.*).html$ newsdesk_index.php?newsPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nri-(.*).html$ newsdesk_reviews_info.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nra-(.*).html$ newsdesk_reviews_article.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-po-([0-9]+).html$ pollbooth.php?pollid=$2&%{QUERY_STRING}
# End Ultimate SEO V2.2d

 

In the readme file was also metioned that it could be a problem in configure.php

 

<?php
define('HTTP_SERVER', 'http://mypage.com');
define('HTTPS_SERVER', 'http://mypage.com');
define('ENABLE_SSL', false);
define('HTTP_COOKIE_DOMAIN', '');
define('HTTPS_COOKIE_DOMAIN', '');
define('HTTP_COOKIE_PATH', '/osc-shop/');
define('HTTPS_COOKIE_PATH', '/osc-shop/');
define('DIR_WS_HTTP_CATALOG', '/osc-shop/');
define('DIR_WS_HTTPS_CATALOG', '/osc-shop/');
define('DIR_WS_IMAGES', 'images/');
define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
define('DIR_WS_INCLUDES', 'includes/');
define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
define('DIR_FS_CATALOG', '/usr/www/users/xxx/osc-shop/');
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
define('DB_SERVER', 'xxx');
define('DB_SERVER_USERNAME', 'xxxx');
define('DB_SERVER_PASSWORD', 'xxxx');
define('DB_DATABASE', 'xxxx');
define('USE_PCONNECT', 'false');
define('STORE_SESSIONS', 'mysql');
define('CFG_TIME_ZONE', 'Europe/Berlin');
?>

 

 

Thanks for any help I can get

Edited by BadLuck

Share this post


Link to post
Share on other sites

This addon self-installs when you visit the shop after installation. Since you can't find it in admin, it would seem that didn't happen. You should be able to visit your home page even if the code isn't working unless there is a mistake in the installation or if your server doesn't have mod rewrite enabled. You should go over the installation steps again to be sure a mistake wasn't made and also ask your host if that module is enabled. You could also look in the error log file that is in your root, if there is one there, to see what the failure is. Or ask your host to check that (some will - some won't).

Share this post


Link to post
Share on other sites

[...]try removing the "Options +FollowSymLinks"[...]

 

THANKS JACK!

that did it. saved me a lot of headache.

 

had same problem as post #6855

Share this post


Link to post
Share on other sites

Jack,

 

Hi, Thank you for your continued support and maintenance of this feature, for your other developed add-ons and for your general support. Like many others, I'm grateful for the considerable time and help you give.

 

To help my understanding, could you please comment/help on the following (apologies if it's a bit long & tedious) -

 

1) After implementing the latest version I noticed that when selecting a manufacturer the generated URL was something like -m-1.html instead of matrox-m-1.html. I think it may be due a minor fault in the latest (and possibly previous) version of seo.class.php -

Line 1257 reads

WHERE manufacturers_id='".(int)$mID."'

should be?

WHERE m.manufacturers_id='".(int)$mID."'

(i.e. 'manufacturers_id' is not a unique, it is in both tables?).

 

Using a cache may mask this so it's possibly not immediately obvious?

 

(I only ever have 1 language so I may remove the join to TABLE_MANUFACTURERS_INFO anyway).

 

 

2) When displaying the first page of a product listing, 'page=1' may be displayed in the URL depending on circumstances. Is it possible to easily suppress the 'page=1'? (Is it better to attempt it in tep_href_link function or not do it at all).

 

 

3) seo_class.php uses mysql functions as opposed to the mysqli functions used in osC 2.3.3.4, is it worth replacing the mysql with mysqli, or maybe better (?), replace the '$this->DB->' statements with the corresponding tep functions?

 

 

4) I am using Ultimate SEO URLs in my latest (v2.3.3.4) version of osC, previously I used SEO URL 5. SEO URL 5 had an option to “Force a redirect to www.mysite.com/ when www.mysite.com/index.php”, is it possible to do this with Ultimate SEO URLs ?

 

 

5) What is the purpose of the statement in application_top -

if ( !isset($seo_urls) || !is_object($seo_urls) ){

 

 

6) What is the pupose of the statements in the tep_href_link function -

if ( !is_object($seo_urls) ){

if ( !class_exists('SEO_URL') ){

 

 

 

Many thanks.

Share this post


Link to post
Share on other sites

@@trier

Hi, Thank you for your continued support and maintenance of this feature, for your other developed add-ons and for your general support. Like many others, I'm grateful for the considerable time and help you give.
You're welcome and I appreciate you saying that. As for your questions:

 

1 - Yes, that is the correct fix. I just ran across this problem today and applied it to the next version.

 

2 - I've not seen the problem with page 1 displaying. You could add code to the seo.class file to check for that and not add it if it is number 1 but that seems like bloating the code for almost no purpose. It won't hurt the shop as long as you have a canonical meta tag.

 

3 - Replacing the calls to use mysqli would probably speed it up a little. I thought of doing this myself but don't have the time at the moment. Using in-built functions in a class can cause problems if you are not careful and I'm not sure this would be a benefit.

 

4 - Yes, it's possible.

 

5 and 6 - They are checking to see if the addon is installed or not.

Share this post


Link to post
Share on other sites

Jack,

First THANK YOU! for so much work you continue to share so willingly.

 

Is there a preferred 1st install Header Tags SEO or Ulitmate SEO?

 

Ken


OSC v2.3.4.1 BS EDGE
Ultimate SEO

 

Share this post


Link to post
Share on other sites

Hi I love this addon but a customer has suddenly got the urls not working, maybe a server change as he is on shared server. When I go to www.motoward.co.uk and check links it shows this

example: as I hover http://www.motoward.co.uk/oakley-retro-beanie-p-4324.html

but then when I go to page it changes to http://www.motoward.co.uk/--p-4324.html any ideas as to what is wrong.

 

I changed the .htaccess to remove or try different symlinks but no change.

 

Nothing else has changed with the site.

Edited by opsman

Share this post


Link to post
Share on other sites

Hi,

 

I built an oscommerce site a while back www.mossurfing.com with this add on and made some tweaks to have hyphen separators between my category titles (www.mysite.com/category1-category2)

 

Example: http://www.mossurfing.com/women-snow-jackets-c-118_127.html

 

I am currently building a new site but with a different host this time. I just copied over my previous site to this new host however my hyphen separators get wiped out (www.mysite.com/category1category2)

 

Example: http://www.soon-line.com/hommesaccessoires-c-112_159.html

 

I haven't changed anything so I'm thinking this is an issue on the host side but what could it be?

Any help/advice would be very welcome!

 

Many thanks

Share this post


Link to post
Share on other sites

@@opsman I've only seen that with older versions of this addon so be sure you are using the latest version. If it is, you may try using the uninstall option in the settings so that everything gets reset.

Share this post


Link to post
Share on other sites

Ok thanks Jack - I'll just uninstall it and install the latest version and see what that does.

Share this post


Link to post
Share on other sites

If I understand right in this forum, special character conversion problem isnt solved?

 

For me doesnt work - I tryed different url versions ("Add category parent to product URLs?" etc.) - nothing.

Share this post


Link to post
Share on other sites

Unfortunately, I don't have a way to troubleshoot it since it works for me here. Maybe it is due to the character set used in your shop or on the server, or something like that. All I can suggest is that you try using the uninstall option in the settings so that the cache get cleared, or clear the cache table manually, and try again.

Share this post


Link to post
Share on other sites

@@gvv

 

what special characters do you have trouble with?

i have following setting inside the configuration area and it works for me. (see attached image)

 

Enter special character conversions: Ü=>Ue,ü=>ue,Ö=>Oe,ö=>oe,Ä=>Ae,ä=>ae,ß=>ss

Share this post


Link to post
Share on other sites

@@opsman I've only seen that with older versions of this addon so be sure you are using the latest version. If it is, you may try using the uninstall option in the settings so that everything gets reset.

 

I will try and report back

Share this post


Link to post
Share on other sites

@@Jack_mcs @@Tsimi

 

I enabled "Enable use Header Tags SEO as name?" then cleared cache and custom url field works!

So special character conversion problem is also solved becouse I use custom url (I think its great SEO feature).

 

Thanks Jack for great addon!

Share this post


Link to post
Share on other sites

Hi All

 

I recently had Ultimate SEO URL v2.2 (http://addons.oscommerce.com/info/2823) and Google XML Site installed on my website which runs OSC 2.3.3.

 

Now that I needed to have my meta tags updated, a SEO developer had this to say after encountering problems and I quote:

 

Hi George,

 

Wanted to tell you that there is an issue with the SEO plugin for OSC 2.3.3, the Modular SEO Header Tags - http://addons.oscommerce.com/info/7646. It doesn't have the meta description edit option for the category pages. It works for 2.3.2 version of OSC but not for the latest one. We looked to find a solution but nothing emerged. We did all sorts of tests on our own server, we installed different versios of OSC and it turned out to be this way, so the plugin isn't allowing us to modify the meta descriptions for the category pags (we managed to do it for homepage for instance, only the categories have this issue).

 

So I don't know what we can do more for now. Do you have a webmaster, a developer? Maybe you can ask them to see if they can find a solution, we are not code specialists and even if we solved numerous dead-ends in the past, we don't have much to do now.

 

Thank you

 

 

My question is, can anybody please help me with a solution as to how we can edit the category pages meta descriptions.

 

Much appreciated.

 

George

Share this post


Link to post
Share on other sites

@@outdoorgeek That problem isn't related to this addon. They are talking about an in-built meta tag program. I recommend Header Tags SEO instead of it, though it doesn't sound like they would be able to install it. For the problem they mention, you need to ask in the support thread for that built-in code, named Header Tags SEO Reloaded.

Share this post


Link to post
Share on other sites

I'm sorry. Yes, you are correct. I misread the post. But, again, that is not related to this addon. You will need to ask in its support thread for help with it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×