Jump to content
spidometrs

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

Recommended Posts

Jack - can you expand on this? I have a problem within MVS Shipping 1.2.2 which I am pretty sure is related to UltSeo v 22d5

 

the MVS Product Ship Estimator works once per session, first click

http://www. xxxxxx.com/products_ship_estimator.php?pid=24

 

Then a &amp appears on subsequent quotes urls... ie breaks it. such as

 

http://www. xxxxxxx.com/products_ship_estimator.php?action=process&pid=24

I don't use that contribution so I can't test it. Does that code work if Ultimate SEO is turned off? What version of Ultimate SEO are you using? You could try finding this line in seo.class.php

$string = preg_replace('(('))', '-', strtolower($string));

and adding this below it

$string = preg_replace('((&))', '&', strtolower($string));

That's a quick and dirty fix and I'm not sure it will not cause other problems, though I don't think so. But it is worth a try.

Share this post


Link to post
Share on other sites

The - tells the search engines to treat the attached words as one keyphase while the / seperates them into two. So computer-products/ibm-clones would be targeting two keyphases for that page, while computer-products-ibm-clones would target one. If all of those words are used on the page, as they should be, then it probably won't make a big difference in the results. But it would be difficult, in most cases, to work the category name and product name into the same sentence so, in my opinion, the / is the preferred method.

I understand that it is always better to choose dashes instead of underscores, but not that sure about category separators. In my opinion, / would be more attractive to users. Was there any specific reason for using - as the category separator instead of the /? How difficult would it be to make a switch?


Absinthe Original Liquor Store

Share this post


Link to post
Share on other sites

I understand that it is always better to choose dashes instead of underscores, but not that sure about category separators. In my opinion, / would be more attractive to users. Was there any specific reason for using - as the category separator instead of the /? How difficult would it be to make a switch?

You can change it in this line

$cName = $result['parentName'] . '-' . $cName;

Share this post


Link to post
Share on other sites

I don't use that contribution so I can't test it. Does that code work if Ultimate SEO is turned off? What version of Ultimate SEO are you using? You could try finding this line in seo.class.php

$string = preg_replace('(('))', '-', strtolower($string));

and adding this below it

$string = preg_replace('((&))', '&', strtolower($string));

That's a quick and dirty fix and I'm not sure it will not cause other problems, though I don't think so. But it is worth a try.

 

That did not make any difference - thanks for the suggestion though.

 

RC2a

php5 and mysql5

MVS Shipping 1.2.2

UltimateSeo v 22d5

 

I've searched my entire site for any =preg_replace that may be converting the & to &amp and found none.

i am quite stumped. The code within product_ship_estimator is

 

// Get the action value and scrub it
 $action = '';
 if (isset ($_GET['action']) ) {
   $action = $_GET['action'];
 }
 $action = preg_replace ("(\r\n|\n|\r)", '', $action);  // Remove CR &/ LF
 $action = preg_replace ("/[^a-z_]/i", '', $action); // Strip anything we don't want

 //Get the products id
 $products_id = (int) $_GET['pid']; //Will be 0 if $_GET['pid'] is not set

// If the customer is logged in OR has previously entered the ship-to data,
//   AND the action has not already been set to process the quote, 
//   set the action and get the quote
 if (!tep_not_null ($action) && (tep_session_is_registered ('customer_id') || (tep_session_is_registered ('shippostcode') && tep_session_is_registered ('shipcountry') ) ) ) {
   tep_redirect (tep_href_link (FILENAME_PRODUCTS_SHIP_ESTIMATOR, 'action=process&pid=' . $products_id, 'SSL'));
 }

////

 

the outputed url is

http://www. xxx.com/products_ship_estimator.php?action=process&pid=19

 

Note: this url is a popup shipping quote - could the fact that its a popup javascript have an effect on the url processiing?

 

Thank you for the support

 

Dave

Edited by Roaddoctor

-Dave

Share this post


Link to post
Share on other sites

That did not make any difference - thanks for the suggestion though.

No, it wouldn't now that I take a second look since Ultimate SEO isn't rewriting the url. You didn't say if it works or not with Ultimate SEO turned off. I don't see anything wrong with that code. I do seem recall a php version that was replacing & with the code so maybe that is the issue. You may also want to search the forums for such a problem since I'm sure I've seen it somewhere here. But it isn't an Ultimate SEO issue that I can see.

Share this post


Link to post
Share on other sites

Jack I read somewhere that when upgrading to PHP5 (which I just did) something needs to be modified all the pages are down that use this output

 

I have been using search but I can't find the exact answer. All the other pages are working now except any with the contrib output. What am I missing? It is always something easy and simple that gets me

 

(I get the blasted 404 page!)


The Site can be viewed at www.performanceautopartsonline.com

 

The site is live (despite these minor glitches) please respect that and do not sign up etc...

 

maybe a contribution one day when I get this site the way I want it.

 

I don't make spelling mistakes! I have dyslecsic fingers.

Share this post


Link to post
Share on other sites

I have been using search but I can't find the exact answer. All the other pages are working now except any with the contrib output. What am I missing? It is always something easy and simple that gets me

 

(I get the blasted 404 page!)

Try turning it off to see if it still fails.

Share this post


Link to post
Share on other sites

Hi

 

I am having trouble with Ultimate SEO and wondered if someone can help?

 

Basically I have a problem with the sub category showing in the url. It just seems to show the top level category only.

 

Say the top level is dog-supplies-c-25.html and the address bar shows it correctly. When I click the sub category which is Dog Beds the address now shows dog-supplies-c-25_26.html.

 

Although when I hover over the link to Dog Beds it shows in the status bar as dog-beds-c-25_26.html but not in the address bar when clicked.

 

Any clues would be appreciated.

 

Thanks

 

Dan

Share this post


Link to post
Share on other sites

Hi

 

I am having trouble with Ultimate SEO and wondered if someone can help?

 

Basically I have a problem with the sub category showing in the url. It just seems to show the top level category only.

 

Say the top level is dog-supplies-c-25.html and the address bar shows it correctly. When I click the sub category which is Dog Beds the address now shows dog-supplies-c-25_26.html.

 

Although when I hover over the link to Dog Beds it shows in the status bar as dog-beds-c-25_26.html but not in the address bar when clicked.

 

Any clues would be appreciated.

 

Thanks

 

Dan

 

Sounds to me like "cocked up" seo url validation. If the hover shows the correct uri then that is exactly what will be delivered to osCommerce.

 

If you have the firefox browser download the "Live http headers" addon, this will show you if the correct link is being 301 redirected to an incorrect link.

 

If it is an incorrect 301 redirect then this is very very nasty for seo.

 

Which version of this contribution are you on?

Edited by FWR Media

Share this post


Link to post
Share on other sites

You can change it in this line

$cName = $result['parentName'] . '-' . $cName;

I've already tried but was not sure... if I change it to

$cName = $result['parentName'] . '/' . $cName;

it shows no separator between category parent and subcategory I'm afraid. Underscore not working either. Three --- shows one - only if that helps.

Edited by mr_absinthe

Absinthe Original Liquor Store

Share this post


Link to post
Share on other sites

Jack - can you expand on this? I have a problem within MVS Shipping 1.2.2 which I am pretty sure is related to UltSeo v 22d5

 

the MVS Product Ship Estimator works once per session, first click

http://www. xxxxxx.com/products_ship_estimator.php?pid=24

 

Then a &amp appears on subsequent quotes urls... ie breaks it. such as

 

http://www. xxxxxxx.com/products_ship_estimator.php?action=process&pid=24

 

A kick in the right direction would help. Thanks!

 

php5.16

mysql5.077

 

If anyone else has issues with & in URL's - the fix is simple. Based on a post by FWR Media elsewhere on the forums.

 

If you are having & & problems

Try this..

 

Find function tep_redirect in catalog/includes/functions/general.php

 

Find ..

 

        header('Location: ' . $url);

 

Replace with

 

        $url = str_replace('&', '&', $url);
       header('Location: ' . $url);

Edited by Roaddoctor

-Dave

Share this post


Link to post
Share on other sites

I've already tried but was not sure... if I change it to

$cName = $result['parentName'] . '/' . $cName;

it shows no separator between category parent and subcategory I'm afraid. Underscore not working either. Three --- shows one - only if that helps.

 

$cName = $result['parentName'] . '/' . $cName;

 

This cannot and will not work.

Share this post


Link to post
Share on other sites

Sounds to me like "cocked up" seo url validation. If the hover shows the correct uri then that is exactly what will be delivered to osCommerce.

 

If you have the firefox browser download the "Live http headers" addon, this will show you if the correct link is being 301 redirected to an incorrect link.

 

If it is an incorrect 301 redirect then this is very very nasty for seo.

 

Which version of this contribution are you on?

 

Where can I find the version number in the code? It does say at top of seo.class.php * Ultimate SEO URLs Contribution - osCommerce MS-2.2.

 

But I can't find the actual version number? Any clues?

 

I installed the add on you suggested but I am not really sure what I am looking for.

 

From what I can see though it trys the url dog-beds-c-25_26.html and a few lines down it says:

 

HTTP/1.x 301 Moved Permanently

 

And then by the looks of it trys the url: dog-supplies-c-25_26.html

 

Which gives a HTTP/1.x 200 OK

 

 

Does this help? Or do you need more info?

 

It is weird because the top category works ok and when click on a product that works ok but not the sub category!!

 

Thank you for your help with this. Also just a note that it isn't fully live yet so it isn't a major problem in terms of the search engines yet.

Edited by djruffle1

Share this post


Link to post
Share on other sites

From what I can see though it trys the url dog-beds-c-25_26.html and a few lines down it says:

 

HTTP/1.x 301 Moved Permanently

 

And then by the looks of it trys the url: dog-supplies-c-25_26.html

 

Which gives a HTTP/1.x 200 OK

 

That is precisely what I was afraid of .. very bad news.

 

The search engines are being told to ignore dog-beds-c-25_26.html and that dog-supplies-c-25_26.html is the correct url.

 

Worse still dog-beds-c-25_26.html remains as a link on your site and therefore every time the search engines visit they will get that same redirection, which they very much don't like.

 

You won't find a version number in the files, do you not know which version you downloaded?

Share this post


Link to post
Share on other sites

That is precisely what I was afraid of .. very bad news.

 

The search engines are being told to ignore dog-beds-c-25_26.html and that dog-supplies-c-25_26.html is the correct url.

 

Worse still dog-beds-c-25_26.html remains as a link on your site and therefore every time the search engines visit they will get that same redirection, which they very much don't like.

 

You won't find a version number in the files, do you not know which version you downloaded?

 

I have been a bit stupid and don't have the original package I downloaded. I presume though that I downloaded the latest version back in Aug / Sep time.

 

Will it make a big difference no the version. Is there a fix for this or will I have to start again?

 

Many Thanks

Share this post


Link to post
Share on other sites

Where can I find the version number in the code?

 

From what I can see though it trys the url dog-beds-c-25_26.html and a few lines down it says:

 

HTTP/1.x 301 Moved Permanently

 

And then by the looks of it trys the url: dog-supplies-c-25_26.html

Like many contributions, this one never had a version in the files. And, like with any contributions, if you use old versions, they may not work as they should. Download my last version, Ultimate SEO 2-2.2d-5, and you should find the code works fine. Keep in mind the option you are using is relatively new and may still have some kinks to work out but I've installed it into shops that are using it and it works fine.

Share this post


Link to post
Share on other sites

Like many contributions, this one never had a version in the files. And, like with any contributions, if you use old versions, they may not work as they should. Download my last version, Ultimate SEO 2-2.2d-5, and you should find the code works fine. Keep in mind the option you are using is relatively new and may still have some kinks to work out but I've installed it into shops that are using it and it works fine.

 

I have just downloaded the latest version and literally just uploaded the se.class.php and seo.cache files and it now seems to be working fine.

 

Many thanks for your help.

Share this post


Link to post
Share on other sites

for all those who get the Call to undefined function: mb_convert_case error in seo.class.php because you run the php4 version add this in your htaccess file

 

AddHandler x-httpd-php5 .php

AddType application/x-httpd-php5 .php

 

at least it worked for me

Share this post


Link to post
Share on other sites

a better advice is tell the host to put your site on php5, or change host. most hosts by now offer php5 as standard and there is longer php4 as an option. i cant imagine what sort of hosts would still provide php4 by default. php.net has stopped supporting php4 for over a year now.

Ken


commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Share this post


Link to post
Share on other sites

a better advice is tell the host to put your site on php5, or change host. most hosts by now offer php5 as standard and there is longer php4 as an option. i cant imagine what sort of hosts would still provide php4 by default. php.net has stopped supporting php4 for over a year now.

Ken

 

Yeah .. gets me too .. I could understand the initial reservations but 5.2 has been around since 2006!!

Share this post


Link to post
Share on other sites

I upgraded from Ultimate_SEO_URLSv21d_UPDATED-23-NOV-2008 to Ultimate_SEO_URLSv22d_5 and the only step nessesary was to upload the new class file.

 

But after upgrade i am missing the Add cPath to product URLs? option in admin. Is there some optional steps that have to be done.

 

Here is the options that are in admin.

 

Enable SEO URLs? true

Add category parent to product URLs? false

Add category parent to begining of URLs? false

Filter Short Words 3

Output W3C valid URLs (parameter string)? true

Enable SEO cache to save queries? true

Enable product cache? true

Enable categories cache? true

Enable manufacturers cache? true

Enable all products seo cache? true

Enable articles cache? true

Enable topics cache? true

Enable information cache? true

Enable link directory cache? true

Enable automatic redirects? true

Enable use Header Tags as name? false

Choose URL Rewrite Type Rewrite

Enter special character conversions

Remove all non-alphanumeric characters? false

Reset SEO URLs Cache false

Uninstall Ultimate SEO

Share this post


Link to post
Share on other sites

I upgraded from Ultimate_SEO_URLSv21d_UPDATED-23-NOV-2008 to Ultimate_SEO_URLSv22d_5 and the only step nessesary was to upload the new class file.

Not so. There was at least two other changes. You need to go back in and perform all of the install instructions or you may have problems at some point.

 

But after upgrade i am missing the Add cPath to product URLs? option in admin. Is there some optional steps that have to be done.

 

Here is the options that are in admin.

 

Enable SEO URLs? true

Add category parent to product URLs? false

Add category parent to begining of URLs? false

It was replaced in the later version with the add category option.

Share this post


Link to post
Share on other sites

I need a little help. I just installed Ultimate_SEO_URLSv22d_5

 

I got down to the test and it does not work. The other pages like index, contact_us and other stuff works. The catagories are not loading after the change. I thought I followed the steps clearly. Any thought how I might have messed up?

 

Site is here: The index page

 

It added the name of the catagory to the url but it can not find the page.


If you can't have fun doing it, it's not worth doing!

Share this post


Link to post
Share on other sites

Rob: what is in your .htaccess?

 

Jack, have you noticed my post #4312?

Edited by mr_absinthe

Absinthe Original Liquor Store

Share this post


Link to post
Share on other sites

Rob: what is in your .htaccess?

 

# $Id: .htaccess 1739 2007-12-20 00:52:16Z hpdl $
#
# 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

 

I go into file access and paste in the section it says too. But when i come back I do not see it. I can't see the file with filezilla

Edited by Mad Duck

If you can't have fun doing it, it's not worth doing!

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

×