Jump to content



Photo
* * * * * 12 votes

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


  • Please log in to reply
6949 replies to this topic

#6461   zandapro

zandapro
  • Members
  • 29 posts
  • Real Name:Amanda
  • Gender:Female

Posted 26 March 2012 - 15:00

yes, this module is installed in an osc 2.3.1, can that be a problem then?

#6462   Jack_mcs

Jack_mcs
  • Members
  • 26,457 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 26 March 2012 - 16:44

yes, this module is installed in an osc 2.3.1, can that be a problem then?

No, it works fine in 2.3.

#6463   zandapro

zandapro
  • Members
  • 29 posts
  • Real Name:Amanda
  • Gender:Female

Posted 26 March 2012 - 22:17

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...

#6464   zandapro

zandapro
  • Members
  • 29 posts
  • Real Name:Amanda
  • Gender:Female

Posted 27 March 2012 - 12:52

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??

#6465   zandapro

zandapro
  • Members
  • 29 posts
  • Real Name:Amanda
  • Gender:Female

Posted 27 March 2012 - 13:04

I've chmod it at 444, let's see tomorrow.. but has this happened to anyone else with their site?

#6466   ABit

ABit
  • Members
  • 12 posts
  • Real Name:Mark Müller

Posted 28 March 2012 - 12:32

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, 28 March 2012 - 12:46.


#6467   Jack_mcs

Jack_mcs
  • Members
  • 26,457 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 28 March 2012 - 13:05

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.

#6468   ABit

ABit
  • Members
  • 12 posts
  • Real Name:Mark Müller

Posted 28 March 2012 - 13:30

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.

#6469   Jack_mcs

Jack_mcs
  • Members
  • 26,457 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 28 March 2012 - 17:29

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.

#6470   ABit

ABit
  • Members
  • 12 posts
  • Real Name:Mark Müller

Posted 28 March 2012 - 22:31

Thats absolute understandable. I'll give it a try to merge the old contribution with the new redirect functions.

#6471   ABit

ABit
  • Members
  • 12 posts
  • Real Name:Mark Müller

Posted 29 March 2012 - 19:21

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

#6472   Jack_mcs

Jack_mcs
  • Members
  • 26,457 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 29 March 2012 - 22:24

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.

#6473   ABit

ABit
  • Members
  • 12 posts
  • Real Name:Mark Müller

Posted 30 March 2012 - 04:22

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.

#6474   LaliaTK

LaliaTK
  • Members
  • 6 posts
  • Real Name:Charlotte

Posted 30 March 2012 - 06:56

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.we...come.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?

#6475   Jack_mcs

Jack_mcs
  • Members
  • 26,457 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 30 March 2012 - 13:24

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', '');



#6476   LaliaTK

LaliaTK
  • Members
  • 6 posts
  • Real Name:Charlotte

Posted 30 March 2012 - 19:10

Thanks, Jack_ms - I tried all those things (even tried the HTTP_COOKIE_DOMAIN without the dot before the IP address) and no dice. /sad.png' class='bbc_emoticon' alt=':(' />

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

Edited by LaliaTK, 30 March 2012 - 19:11.


#6477   Jack_mcs

Jack_mcs
  • Members
  • 26,457 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 31 March 2012 - 00:26

Thanks, Jack_ms - I tried all those things (even tried the HTTP_COOKIE_DOMAIN without the dot before the IP address) and no dice. /sad.png' class='bbc_emoticon' alt=':(' />

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.

#6478   LaliaTK

LaliaTK
  • Members
  • 6 posts
  • Real Name:Charlotte

Posted 31 March 2012 - 02:41

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.gif' class='bbc_emoticon' alt=':thumbsup:' />

#6479   Marius_R

Marius_R
  • Members
  • 2 posts
  • Real Name:Mariusz

Posted 12 April 2012 - 09:30

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

#6480   Jack_mcs

Jack_mcs
  • Members
  • 26,457 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 12 April 2012 - 13:22

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.