Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


Recommended Posts

All right Jack, thank you for the hint - i'm the blind one.

So i see, i've got an ultra-old version installed: Version 2.1 from late 2007.

Can i simply upgrade from my version to the latest version "Ultimate SEO 2-2.2d-11" or would you suggest to pick a different version berfore i do the final upgrade.

Main aim is, that the URLs won't change if i do the upgrade.

You can upgrade directly to it but you have to do the full installation. The steps are all the same and the code may appear similar but if you skip anything, it might fail. When it says to replace the code in the html_output.php file, the code in yours won't match that in the instructions but replace that whole section anyway.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

hello,

 

I installed the latest version and everything works ok except for the fact that every day the file seo.class.php deletes itself from shop/includes/classes/ folder...

 

In my ftp I have put now chmod at 555, let's see what happens tomorrow... but it's really bugging me, has anyone had a similar problem?? Is there an internal problem with the contribution?

 

best regards!

amanda.

Link to comment
Share on other sites

hello,

 

I installed the latest version and everything works ok except for the fact that every day the file seo.class.php deletes itself from shop/includes/classes/ folder...

 

In my ftp I have put now chmod at 555, let's see what happens tomorrow... but it's really bugging me, has anyone had a similar problem?? Is there an internal problem with the contribution?

 

best regards!

amanda.

There's not anything in the code that can do that. The problem is with something else in your shop.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

well, i've checked it out now that is the following day, and I don't get the error anymore, so the chmod 555 on the folder where the seo.class.php was getting deleted now is protected, that did the trick.. maybe i have a hacker around trying to do things on my online shop.. so I'll have to be on guard with other things too...

Link to comment
Share on other sites

o no.. it's me again, I've just checked it now in the middle of the day, and it has done it again!! how weird is this:

 

http://tartamia.com/index-os.php

 

its a fatal error: file not found of the seo.class.php > in the includes/classes/seo.class.php

 

the permission in the file is chmod at 555, so no one is allowed to write in it or do anything.. and it keeps deleting itself!

 

any ideas??

Link to comment
Share on other sites

Unfortunately i couldnt use the new Version of the contribution, because it altered all category URLs:

I've got lots of categories with a maximum category depth of 3, e.g. like this:

 

-> House (=Main_Cat)

--> Room (=Sub_Cat)

---> Window (=Sub_Sub_Cat)

 

The SEO-URLs Contribution i've installed (V2.1) generated the following URLs

To House: domain.com/house-c-1.html

To Room: domain.com/house-room-c-1_2.html

To Window: domain.com/room-window-c-1_2_3.html

 

The New contribution (V2.2) generates:

To House: domain.com/house-c-1.html

To Room: domain.com/house-room-c-1_2.html

To Window: domain.com/house-window-c-1_2_3.html

 

So i counldnt use the newest version ofthe contribution since a lot of important categories would have been rewritten to new URLs.

 

Now i tried to replace the Rewrite functions from the newest version in my older version 2.1, which mostly works.

 

But 2 Problems:

1) the separators (if should be present) are left out at all categories URLs.

2) category depth 3: instead of rewriting to domain.com/room-window-c-1_2_3.html it rewrites to domain.com/houseroomwindow-c-1_2_3.html.

 

My individual problem could be located in the function need_redirect().

 

if ($this->attributes['SEO_ADD_CAT_PARENT'] != 'true') {
									  if (strpos($cID, "_") !== FALSE) { //test for sub-category
										$parts = explode("_", $cID);
										$cID = $parts[count($parts) - 1];
									  }
									  if ($this->attributes['USE_SEO_PERFORMANCE_CHECK'] == 'true') $this->performance['NUMBER_QUERIES']++;
									  $sqlCmd = $this->attributes['USE_SEO_HEADER_TAGS'] == 'true' ? 'LOWER(categories_htc_title_tag) as cName' : 'LOWER(categories_name) as cName';
									  $sql = "SELECT " . $sqlCmd . "
										  FROM ".TABLE_CATEGORIES_DESCRIPTION."
										  WHERE categories_id='".(int)$cID."'
										  AND language_id='".(int)$this->languages_id."'
										  LIMIT 1";
									  $result = $this->DB->FetchArray( $this->DB->Query( $sql ) );
									  $cName = $result['cName'];
								  } else {
									[....]

 

How could i rewrite the code that it'll behave like before?

Or maybe it'd be easier for me, to adapt the code in the newest version of this contribution? Must be one or two lines.

Edited by ABit
Link to comment
Share on other sites

Unfortunately i couldnt use the new Version of the contribution, because it altered all category URLs:

I've got lots of categories with a maximum category depth of 3, e.g. like this:

 

-> House (=Main_Cat)

--> Room (=Sub_Cat)

---> Window (=Sub_Sub_Cat)

 

The SEO-URLs Contribution i've installed (V2.1) generated the following URLs

To House: domain.com/house-c-1.html

To Room: domain.com/house-room-c-1_2.html

To Window: domain.com/room-window-c-1_2_3.html

 

The New contribution (V2.2) generates:

To House: domain.com/house-c-1.html

To Room: domain.com/house-room-c-1_2.html

To Window: domain.com/house-window-c-1_2_3.html

 

So i counldnt use the newest version ofthe contribution since a lot of important categories would have been rewritten to new URLs.

You could enable the include category parent option. But if the url is different, a 301 would be issued by the code.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

You mean this setting: "Add category parent to begining of URLs"

Unfortunately it is already set to "true".

 

I'd have to change the code, that it uses the current category plus one category below for the URLs. Then we've got exactly what i had before.

In the new Version, it uses the main category plus the current subcategory.

 

Where in the code could i do that?

Thanks again for your reply Jack.

Link to comment
Share on other sites

Where in the code could i do that?

Thanks again for your reply Jack.

I'm sorry but I don't offer support for specialized coding in support threads.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Short update for ppl with a similar problem (Upgrade from e.g. 2.1d to a new Version would generate different category URLs).

 

The contribution Independent SEO URL Validation (for ULTIMATE SEO URLs) did the trick:

http://addons.oscommerce.com/info/5738

To be clear so as to save others trouble, that contribution is not required with V2.2d and will, most likely, cause problems. If it works for you, then you should use it. But for everyone else, it should not be used.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Good point to mention Jack.

My remark was just meant for users, who intend to upgrade from a very old version to the newer ones.

In this case plus having a category depth of 3 or more, the category URLs would change like described.

This would finally lead to a decrease in the "almighty google-ranking".

 

So unfortunately i had to keep the old version and added the "validation contribution".

Of course it is a special case, but still should be mentioned for users who have their SEO-URLs unchanged in the google-index since years.

Link to comment
Share on other sites

I'm getting 404's on all links from my store's front page. Similar to many others, the trouble goes away if I disable the module in admin.

 

I installed V2.2d of this contribution. Store is installed at:

 

http://174.121.37.99/~maple/order/

 

(We're setting it up before transferring the domain name, hence the IP address.)

 

Here's my .htaccess:

 

# $Id$

#

# This is used with Apache WebServers

#

# For this to work, you must include the parameter 'Options' to

# the AllowOverride configuration

#

# Example:

#

# <Directory "/usr/local/apache/htdocs">

# AllowOverride Options

# </Directory>

#

# 'All' with also work. (This configuration is in the

# apache/conf/httpd.conf file)

# The following makes adjustments to the SSL protocol for Internet

# Explorer browsers

#<IfModule mod_setenvif.c>

# <IfDefine SSL>

# SetEnvIf User-Agent ".*MSIE.*" \

# nokeepalive ssl-unclean-shutdown \

# downgrade-1.0 force-response-1.0

# </IfDefine>

#</IfModule>

# If Search Engine Friendly URLs do not work, try enabling the

# following Apache configuration parameter

# AcceptPathInfo On

# Fix certain PHP values

# (commented out by default to prevent errors occuring on certain

# servers)

# php_value session.use_trans_sid 0

# php_value register_globals 1

 

# 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 /order/

 

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

 

 

And here's my config (with database stuff removed):

 

define('HTTP_SERVER', 'http://174.121.37.99/~maple');

define('HTTPS_SERVER', 'https://secure585.websitewelcome.com/~maple');

define('ENABLE_SSL', true);

define('HTTP_COOKIE_DOMAIN', 'http://174.121.37.99/~maple');

define('HTTPS_COOKIE_DOMAIN', 'secure585.websitewelcome.com/~maple');

define('HTTP_COOKIE_PATH', '/order/');

define('HTTPS_COOKIE_PATH', '/order/');

define('DIR_WS_HTTP_CATALOG', '/order/');

define('DIR_WS_HTTPS_CATALOG', '/order/');

define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

define('DIR_WS_INCLUDES', 'includes/');

define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');

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', '/home/maple/public_html/order/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

define('DB_SERVER', 'localhost');

define('DB_SERVER_USERNAME', 'removed');

define('DB_SERVER_PASSWORD', 'removed');

define('DB_DATABASE', 'removed');

define('USE_PCONNECT', 'false');

define('STORE_SESSIONS', 'mysql');

 

 

I'm hoping that it isn't some stupid mistake; I don't want to waste your time. But I've researched the daylights out of this problem and am stuck. Please help?

Link to comment
Share on other sites

I'm getting 404's on all links from my store's front page. Similar to many others, the trouble goes away if I disable the module in admin.

 

I installed V2.2d of this contribution. Store is installed at:

 

define('HTTP_COOKIE_DOMAIN', 'http://174.121.37.99/~maple');

 

I'm hoping that it isn't some stupid mistake; I don't want to waste your time. But I've researched the daylights out of this problem and am stuck. Please help?

You may need to comment out
Options +FollowSymLinks

and depending upon your hosting environment, the above should be

define('HTTP_COOKIE_DOMAIN', '.174.121.37.99/~maple');

or

define('HTTP_COOKIE_DOMAIN', '');

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Thanks, Jack_ms - I tried all those things (even tried the HTTP_COOKIE_DOMAIN without the dot before the IP address) and no dice. :(

 

Any other suggestions? In case it matters, we're on HostGator.

Edited by LaliaTK
Link to comment
Share on other sites

Thanks, Jack_ms - I tried all those things (even tried the HTTP_COOKIE_DOMAIN without the dot before the IP address) and no dice. :(

 

Any other suggestions? In case it matters, we're on HostGator.

Ypu could try
define('HTTP_COOKIE_DOMAIN', '.174.121.37.99/~maple/order');

It's not usually needed but may be in your case but many times it won't work with the IP. You just have to leave it turned off until the domain is made active.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Darn, I guess it just won't work with the IP. I will turn it off until we launch, and will update this thread after that, in case others have the same trouble.

 

Thank you VERY MUCH for your help, I really appreciate it. :thumbsup:

Link to comment
Share on other sites

  • 2 weeks later...

Hello,

 

I've installed Ultimate SEO URLs v2.2 about a year ago. Everything worked fine until i decided do set character conversions. The problem is that after setting them (in my example - ó=>o,ł=>l....) all available links on page are still missing converted characters.

For example - the link should lead to "olowek-p-15.html" instead of "owek-p-15.html" as it does. Both pages - "owek" and "olowek" exist. Even "olwek", "oowek".

 

Setting on "enable automatic redirects" makes some strange results. All links still appear in old form, but main categories are redirected corectly.

Ex. Link "okolicznościowe" leads to "okolicznosciowe" not okolicznociowe, but it doesn't work with subcategories (broken redirect) and products - still leading to old pages ("owek").

 

I tried enabling/disabling cache, clearing it and some other things.

 

It's first problem that seems to be difficult to solve by myself after installing some contributions so I'd really appreciate some tips about what to do with this matter, or where to search for solution. I have checked this topic before, but couldn't find similiar problem.

 

Mariusz

Link to comment
Share on other sites

I've installed Ultimate SEO URLs v2.2 about a year ago. Everything worked fine until i decided do set character conversions. The problem is that after setting them (in my example - ó=>o,ł=>l....) all available links on page are still missing converted characters.

For example - the link should lead to "olowek-p-15.html" instead of "owek-p-15.html" as it does. Both pages - "owek" and "olowek" exist. Even "olwek", "oowek".

 

Setting on "enable automatic redirects" makes some strange results. All links still appear in old form, but main categories are redirected corectly.

Ex. Link "okolicznościowe" leads to "okolicznosciowe" not okolicznociowe, but it doesn't work with subcategories (broken redirect) and products - still leading to old pages ("owek").

I've tested the latest version using that option and it worked fine. So all I can suggest is that you make sure you have the latest version of 2.2d and that your character conversions are entered correctly. Try cutting them down to one conversion and verify that works and then increase from there.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...