Jump to content
spidometrs

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

Recommended Posts

Jack,

 

Does your version of this contribution have your "Version Checker" feature?

 

Thanks,

Blaine

No, it doesn't. That is only useful if the name of the contribution is consistent, which it isn't in this case.

Share this post


Link to post
Share on other sites

Hello,

 

I've installed the latest version of Ultimate SEO URLs (2.2d_11) on my fresh install of osCommerce 2.31 and I get a 404 when trying to access any category or product pages. The URL my browser goes to is the SEO URL but it doesn't seem to be understood on the server side.

 

My test store is at:

 

http://208.100.38.208/skateshop/

 

My .htaccess:

 

# Begin Ultimate SEO V2.2d 
Options +FollowSymLinks
RewriteEngine On 

RewriteBase /skateshop/

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

 

I've verified that my modifications are correct and searched the forum for similar issues. Thanks for the help!

Share this post


Link to post
Share on other sites

I am having an issue with this as well.

 

I have moved over from a Windows Server to a Linux server.

 

The links all work fine but I cannot add anything to the cart.

 

It just adds ?action=add_product to the URL.

Share this post


Link to post
Share on other sites

Are you all still sure you know why you are using this old thing?

 

This code is from 2005 and the author hasn't supported it/added a new version since then. There are now 90 odd "versions" most adding their own new bug.

 

I used to support this but I wrote a totally new version Ultimate Seo Urls 5 for your benefit which is PHP 5 code and rewritten from the ground up.

 

PHP 5.2+ ONLY ( PHP4 NOT supported )

 

The now "old" version ( first release June 2009 ) has not had a new bug reported since December 2009. Works on Windows as well as *nix and supports the "worthwhile for SEO" contributions. Adding new contribution support modules is also exremely easy as they are modular themselves.

 

Very important USU5 and the PRO version can replicate and/or 301 redirect the old seo urls so you do not have to lose any indexing/PR

 

The new PRO version is a different world there are too many features to mention here see the comparison

If you run a multi language shop then USU5 PRO is the only option as for the first time EVER your site can be individually indexed seperately for each language.

Edited by FWR Media

Share this post


Link to post
Share on other sites

Anyone have any thoughts on this? Something in the Final r-172 seo-class.php is causing *.php to be re-written as *.php4 adn I don't see it

 

Everything else works out of final r-172, seo-class.hp is causing the error previosuly described.

 

Any constructive thoughts would be appreciated.

 

regards

 

We have been using USU v2.1d Original for several years without a bit of trouble. In it a fit of exuberance, I decided to try the cleaned up Ultimate Seo Urls 2.1d STABLE FINAL r172.

 

 

With 2.1 original, we would see a url such as:

 

http://www.cactustactical.com/osc/ace-stocks-c-453.html'>http://www.cactustactical.com/osc/ace-stocks-c-453.html

 

which was the translated url for:

 

http://www.cactustactical.com/osc/index.php?cPath=453.'>http://www.cactustactical.com/osc/index.php?cPath=453.

 

 

Now with 2.1d Stable Final r172, we get:

 

http://www.cactustactical.com/osc/php4?cPath=453

 

The index. has been lost from the url and php has been changed to php4. This happens for every manufacturers, categories and products page. What we get is the 404 redirect since the url is incomplete.

 

What is interesting is that if the old seo-class.php script is put back, the contribution works fine with the other Final r172 changes. So, the issue is coming out of the seo-class.php script.

 

Looked for a similiar issue, but have not seen anything of this sort since Final r172 was made live.

 

 

Anyone have any ideas?

Share this post


Link to post
Share on other sites

Anyone have any thoughts on this? Something in the Final r-172 seo-class.php is causing *.php to be re-written as *.php4 adn I don't see it

 

Everything else works out of final r-172, seo-class.hp is causing the error previosuly described.

 

Any constructive thoughts would be appreciated.

 

regards

 

 

 

Sounds like a server change, there's nothing in seo.class.php to rewrite the file extension. The reason I say a server change is that often when hosts go from PHP4 only to PHP5 they leave a php 4 option but you have to use the php4 extension.

 

Still seems odd though .. post or pm me a link to the site as I'd need to see it.

 

What are you doing on PHP4 anyway? it's old unsupported and insecure, you'll get hacked.

 

Change to a decent version of PHP then use Ultimate Seo Urls 5 PRO intead of this.

Edited by FWR Media

Share this post


Link to post
Share on other sites

I've installed the latest version of Ultimate SEO URLs (2.2d_11) on my fresh install of osCommerce 2.31 and I get a 404 when trying to access any category or product pages. The URL my browser goes to is the SEO URL but it doesn't seem to be understood on the server side.

 

My test store is at:

 

http://208.100.38.208/skateshop/

 

I've verified that my modifications are correct and searched the forum for similar issues. Thanks for the help!

The contribution won't work when using an IP for the url. Once the domain name is used, enable it and it will work fine.

Share this post


Link to post
Share on other sites

I am having an issue with this as well.

 

I have moved over from a Windows Server to a Linux server.

 

The links all work fine but I cannot add anything to the cart.

 

It just adds ?action=add_product to the URL.

Are you sure the links work? Try turning this contribution off in admin, refresh your home page and try adding to cart again. If it works, then the problem is most probably your configure file is not setup correctly. In that case, post it here (without the login details) and I will take a look at it.

Share this post


Link to post
Share on other sites

Are you all still sure you know why you are using this old thing?This code is from 2005 and the author hasn't supported it/added a new version since then.

 

Not for nothing But Bobby (Chemo) Easland passed away last year and befor that he was banned from contributing on this site. You should know this from the other site that was going to change the world!


If the only tool you have is a hammer, all your problems look like nails

Share this post


Link to post
Share on other sites

The web site is http://www.cactustactical.com.

 

 

Not sure how a server change would come into play. The re-direct process works fine with the original 2.1 version we have been using. I switched over to the r-172 final and things go a bit of hay wire with redirects failing and php4 appearing in the url. This has happened several times as I have installed, backed out and re-installed r 172 final on the off chance I did something in error. It does the samee thing each time. I switch the seoclass.php back to the original 2.1 version and things re-direct properly. It is something in r 172 that seems to be causing the issue.

 

We are currently live using the original 2.1 seoclass. php in conjunction with the few other changes from r 172 and everything works fine.

 

 

We have tried to move to php 5, but get a few errors when doing so. Those are being worked out on a test server in the spare time.

 

regards

 

 

 

 

Sounds like a server change, there's nothing in seo.class.php to rewrite the file extension. The reason I say a server change is that often when hosts go from PHP4 only to PHP5 they leave a php 4 option but you have to use the php4 extension.

 

Still seems odd though .. post or pm me a link to the site as I'd need to see it.

 

What are you doing on PHP4 anyway? it's old unsupported and insecure, you'll get hacked.

 

Change to a decent version of PHP then use Ultimate Seo Urls 5 PRO intead of this.

Share this post


Link to post
Share on other sites

Not sure how a server change would come into play. The re-direct process works fine with the original 2.1 version we have been using. I switched over to the r-172 final and things go a bit of hay wire with redirects failing and php4 appearing in the url. This has happened several times as I have installed, backed out and re-installed r 172 final on the off chance I did something in error. It does the samee thing each time. I switch the seoclass.php back to the original 2.1 version and things re-direct properly. It is something in r 172 that seems to be causing the issue.

 

We are currently live using the original 2.1 seoclass. php in conjunction with the few other changes from r 172 and everything works fine.

 

We have tried to move to php 5, but get a few errors when doing so. Those are being worked out on a test server in the spare time.

I don't understand what you are mean by "r 172" but you should be using version 2.2d. But even with that, it sounds like your problem is in your .htaccess file. You should strip everything out of it except for the change needed for this contribution to see if it works. If it does, then some other entry in that file is at fault.

Share this post


Link to post
Share on other sites

I don't understand what you are mean by "r 172" but you should be using version 2.2d. But even with that, it sounds like your problem is in your .htaccess file. You should strip everything out of it except for the change needed for this contribution to see if it works. If it does, then some other entry in that file is at fault.

 

 

 

Ultimate Seo Urls 2.1d STABLE FINAL r172

 

is a re-write of

 

Ultimate SEO Urls 2.1d.

 

I have not moved on past 2.1d in the past as the additional functionality of the later versions are not needed as we were interested only in the URl re-write functionality.

 

But, thanks for the comments.

Share this post


Link to post
Share on other sites

Anyone have any thoughts on this? Something in the Final r-172 seo-class.php is causing *.php to be re-written as *.php4 adn I don't see it

 

Everything else works out of final r-172, seo-class.hp is causing the error previosuly described.

 

Any constructive thoughts would be appreciated.

 

regards

 

 

 

Hi I have just installed this ( not looked at it for ages ) and it works fine so all I can think of is that you haven't replaced the existing seo urls file changes with those of r-172. There are differences.

 

Admittedly I didn't include any upgrade instructions but if you read between the lines it is quite simple..

 

Wherever there is a change to be made there will be some existing code to replace .. e.g.

 

application_top.php

Replace the existing usu2 code under require(DIR_WS_LANGUAGES . $language . '.php');

 

html_output.php

Replace the complete function tep_href_link()

 

general.php

Replace the complete function tep_redirect()

 

product_listing.php change the code if it exists, if not then you're fine

 

admin/categories - replace the code there

 

admin/includes/functions/general.php replace the complete function tep_reset_cache_data_seo_urls()

 

That's it.

 

If you continue to have problems please let me know what they are but at this point you'll probably be best off staying with 2.1d ORIGINAL updated the contribution has not been improved since then except for the replacement of ereg which won't matter to you as you are on PHP4 plus the addition of some obscure contribution support ( and some bugs ).

Edited by FWR Media

Share this post


Link to post
Share on other sites

I have not moved on past 2.1d in the past as the additional functionality of the later versions are not needed as we were interested only in the URl re-write functionality.

 

But, thanks for the comments.

There are bug fixes in 2.2d not in the version you are using but whichever you prefer is fine if it works for you. However, as mentioned, I think it more likely the problem is elsewhere.

Share this post


Link to post
Share on other sites

Hi I'm trying an installation in a 2.3.1 version and in the 3rd step I have found differences in the html_output.php code from the code of the install instructions, this is the code in the osCommerce v2.3.1:

 

////
// The HTML href link wrapper function
 function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {
   global $request_type, $session_started, $SID;

   $page = tep_output_string($page);

   if (!tep_not_null($page)) {
     die('</td></tr></table></td></tr></table><br /><br /><font color="#ff0000"><strong>Error!</strong></font><br /><br /><strong>Unable to determine the page link!<br /><br />');
   }

   if ($connection == 'NONSSL') {
     $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
   } elseif ($connection == 'SSL') {
     if (ENABLE_SSL == true) {
       $link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG;
     } else {
       $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
     }
   } else {
     die('</td></tr></table></td></tr></table><br /><br /><font color="#ff0000"><strong>Error!</strong></font><br /><br /><strong>Unable to determine connection method on a link!<br /><br />Known methods: NONSSL SSL</strong><br /><br />');
   }

   if (tep_not_null($parameters)) {
     $link .= $page . '?' . tep_output_string($parameters);
     $separator = '&';
   } else {
     $link .= $page;
     $separator = '?';
   }

   while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);

// Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined
   if ( ($add_session_id == true) && ($session_started == true) && (SESSION_FORCE_COOKIE_USE == 'False') ) {
     if (tep_not_null($SID)) {
       $_sid = $SID;
     } elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == true) ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) {
       if (HTTP_COOKIE_DOMAIN != HTTPS_COOKIE_DOMAIN) {
         $_sid = tep_session_name() . '=' . tep_session_id();
       }
     }
   }

   if (isset($_sid)) {
     $link .= $separator . tep_output_string($_sid);
   }

   while (strstr($link, '&&')) $link = str_replace('&&', '&', $link);

   if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true) ) {
     $link = str_replace('?', '/', $link);
     $link = str_replace('&', '/', $link);
     $link = str_replace('=', '/', $link);
   } else {
     $link = str_replace('&', '&', $link);
   }

   return $link;
 }

 

and this is the code in the install instructions:

 

////
// The HTML href link wrapper function
 function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {
   global $request_type, $session_started, $SID;

   if (!tep_not_null($page)) {
     die('<br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>');
   }

   if ($connection == 'NONSSL') {
     $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
   } elseif ($connection == 'SSL') {
     if (ENABLE_SSL == true) {
       $link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG;
     } else {
       $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
     }
   } else {
     die('<br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL</b><br><br>');
   }

   if (tep_not_null($parameters)) {
     $link .= $page . '?' . tep_output_string($parameters);
     $separator = '&';
   } else {
     $link .= $page;
     $separator = '?';
   }

   while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);

// Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined
   if ( ($add_session_id == true) && ($session_started == true) && (SESSION_FORCE_COOKIE_USE == 'False') ) {
     if (tep_not_null($SID)) {
       $_sid = $SID;
     } elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == true) ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) {
       if (HTTP_COOKIE_DOMAIN != HTTPS_COOKIE_DOMAIN) {
         $_sid = tep_session_name() . '=' . tep_session_id();
       }
     }
   }

   if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true) ) {
     while (strstr($link, '&&')) $link = str_replace('&&', '&', $link);

     $link = str_replace('?', '/', $link);
     $link = str_replace('&', '/', $link);
     $link = str_replace('=', '/', $link);

     $separator = '?';
   }

   if (isset($_sid)) {
     $link .= $separator . $_sid;
   }

   return $link;
 }</b>

 

will it be a problem if I continue the installation in the 2.3.1 version?

 

 

regards

Share this post


Link to post
Share on other sites

Hi I'm trying an installation in a 2.3.1 version and in the 3rd step I have found differences in the html_output.php code from the code of the install instructions, this is the code in the osCommerce v2.3.1:

You don't mention what version of Ultimate SEO you are installing but for 2.2vd, and probably for the others, just replace the whole function.

Share this post


Link to post
Share on other sites

sorry, I forgot post it.

Your version, the last: Ultimate SEO 2-2.2d-11

 

Thanks, I will continue with the installation.

Share this post


Link to post
Share on other sites

Is it big diffrence between 2-2.2d-9 VS 2-2.2d-11?

I have -9 installed and im thinking if i should upgrade to -11.

Thanks! (I have RC2a)

Edited by xciso

Share this post


Link to post
Share on other sites

Is it big diffrence between 2-2.2d-9 VS 2-2.2d-11?

I have -9 installed and im thinking if i should upgrade to -11.

Thanks! (I have RC2a)

V11 is mainly just a place holder because so many perople were having problems due to installing the Polish version, thinking it is the one to use since it was the latest. But there are some important differences between d-9 and d-10 so you should upgrade. All you need to do is download d-11, extract the includes/classes/seo.class.php and upload it to your server. Then go to your home page to install it. That will reset your admin settings so you may want to note those if you are not using the default one.

Share this post


Link to post
Share on other sites

The contribution won't work when using an IP for the url. Once the domain name is used, enable it and it will work fine.

 

Well I needed to test that it was indeed going to work before actually switching the domain name over to this host (I'm moving host and having to re-install). So I tried two different setup:

 

#1 I created a subdomain on my old host and made it forward to 208.100.38.208. I changed my osCommerce configure.php files to use the subdomain.domain combination (tes.rollergirl.ca) and cleared the SEO cache.

 

#2 I created a domain pointer on my new host and set it to use a test domain (amazeballs.info). I changed my osCommerce configure.php files to use the test domain and cleared the SEO cache.

 

In both cases I got the same result, I can access the store front page but the SEO URLs results in 404. So there seems to be something else to it than the lack of domain. Right now it's set to the domain pointer setup, the test store is located at:

 

http://amazeballs.info/skateshop/

 

Any help is greatly appreciated.

Edited by cinolas

Share this post


Link to post
Share on other sites

In both cases I got the same result, I can access the store front page but the SEO URLs results in 404. So there seems to be something else to it than the lack of domain. Right now it's set to the domain pointer setup, the test store is located at:

Yes, the .htaccess file has to be setup correctly too. Post it here if you would like it looked at.

Share this post


Link to post
Share on other sites

Yes, the .htaccess file has to be setup correctly too. Post it here if you would like it looked at.

 

 

Thanks for your help Jack, here's the htaccess:

 

# Begin Ultimate SEO V2.2d 
Options +FollowSymLinks
RewriteEngine On 

RewriteBase /skateshop/

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

Share this post


Link to post
Share on other sites

Thanks for your help Jack, here's the htaccess:

 

RewriteBase /skateshop/

That is correct. However, there seems to be problem with your shops setup. If you scroll over the first category on the page (not in the categories box), the url is index.php/cPath/55. That is the type of url that is created when the search engine friendly option is enabled. But this contribution turns that option off so it shouldn't be possible for it to be on. So there is a mistake in the setup somewhere, though I can't say where. But I would look at that setting first. Also turn of cache if that is enabled to be sure it is not interferring in any way.

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

×