Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


Recommended Posts

Hello again!

Thanks for all the help. The SEO Url portion of my .htaccess is below:

 

Options +FollowSymLinks

RewriteEngine On

RewriteBase /

 

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}

Link to comment
Share on other sites

cPath and manufacturers_id are not being passed or not being recognised, why? I haven't a clue as it is down to your site coding. I presume you have the correct lines in .htaccess passing the above mentioned.

 

Something strange happened. I created a new category... while the link didn't not lead to a "Product now found" page, it did instead go to a corresponding product id number.

Link to comment
Share on other sites

Hi

I installed ultimate seo urls 22_d9 it worked with english names correctly but when I tried to use Persian (like arabic) characters , then the name of product urls changed to number ! now it will not working anymore. what happened? :(

Link to comment
Share on other sites

The short word filter does work so I don't know why it is failing for you. But there is only place in the code where it is checked so finding the reason shouldn't be too difficult. Just search the code for FILTER_SHORT_WORDS.

Hi Jack,

 

Thanks, I found the section, working on it. Hope to solve the problem soon!

Link to comment
Share on other sites

Hi all,

Looking for some advice. I'm moving my installation of oscommerce to a new server with php5/mysql5 installed. I'm pretty sure that SEO URLS is working correctly. I had one issue early on, I had to replace <? with <?php in /includes/classes/seo.class.php.

 

Now it looks like I have one issue left. Previously, on my site, category pages were showing up as: www.mydomain.com/categoryname-c-01.html . On my new installation, they are showing up as www.mydomain.com/-c-1.html.

 

My .htaccess area looks the same (as far as I can see!) - it has listed:

 

Options +FollowSymLinks
RewriteEngine On 
RewriteBase /

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 ^(.*)-t-(.*).html$ articles.php?tPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-a-(.*).html$ article_info.php?articles_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 ^(.*)-i-(.*).html$ information.php?info_id=$2&%{QUERY_STRING}

 

Any suggestions?

Edited by bobsi18
Link to comment
Share on other sites

Hi all,

Looking for some advice. I'm moving my installation of oscommerce to a new server with php5/mysql5 installed. I'm pretty sure that SEO URLS is working correctly. I had one issue early on, I had to replace <? with <?php in /includes/classes/seo.class.php.

 

Now it looks like I have one issue left. Previously, on my site, category pages were showing up as: www.mydomain.com/categoryname-c-01.html . On my new installation, they are showing up as www.mydomain.com/-c-1.html.

You need to upgrade to V2.2d.

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 need to upgrade to V2.2d.

 

Ok, I'll jump to it and start installing it... Just a quick one - is "Ultimate SEO 2-2.2d-9" suitable? (uploaded 23 Mar 2010) or is there a better one that you would recommend?

 

Also, is it fair to presume that once installing V2.2d, this isn't backwards compatible? I was planning on uploading my (PHP5/MYSQL5 ready) site to the existing server (PHP4/MYSQL4) before it is migrated across to the new server - would this no longer be possible?

Link to comment
Share on other sites

Hi all,

Looking for some advice. I'm moving my installation of oscommerce to a new server with php5/mysql5 installed. I'm pretty sure that SEO URLS is working correctly. I had one issue early on, I had to replace <? with <?php in /includes/classes/seo.class.php.

[/code]

 

Any suggestions?

 

I recommend Ultimate Seo Urls 5 ( currently no known issues ) which is much more modern modular code built in PHP5 and soon to be upgraded to USU5 PRO see my sig. you can still retain the exact same seo url structure if you want.

 

If you have to ( or for some reason want to ) stay with Chemos old version here I recommend Ultimate Seo Urls 2.1d STABLE FINAL r172.

Edited by FWR Media
Link to comment
Share on other sites

Hey programmers,

 

I find an intresting problem. SEO_URL_INSTALLER() function run after the installed SEO_URL used.

Sometimes I find SEO URLS configuration menu duplicated, and all parameters resetted. (??). In configuration table the SEO_URLS configuration_id goes up.

(???)

Do you have any idea why happened this?

 

 

I tried to run in PHPadmin this code

 

INSERT INTO configuration (`configuration_id`,`configuration_title`,`configuration_key`,`configuration_value`,`configuration_description`,`configuration_group_id`,`sort_order`,`last_modified`,`date_added`,`use_function`,`set_function`) VALUES ('590','SEO Unique Text - Words to Exclude', 'SEO_UNIQUE_TEXT_IGNORE', '', 'List all of the words that you don\'t want modified separated by a semi-colon.', '1', '999', NOW(), NOW(), '', '');

 

 

And later all modification has gone away, and URL_SEO configuration resetted with new configuration_id. Is there any prohibited value for URL_SEO?

 

YES!

 

If you applied URL_SEO, you never use configuration_key value started with "SEO_"

The URL_SEO reset all configuration and delete all "SEO_" started value.

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

Ok, I'll jump to it and start installing it... Just a quick one - is "Ultimate SEO 2-2.2d-9" suitable? (uploaded 23 Mar 2010) or is there a better one that you would recommend?

 

Also, is it fair to presume that once installing V2.2d, this isn't backwards compatible? I was planning on uploading my (PHP5/MYSQL5 ready) site to the existing server (PHP4/MYSQL4) before it is migrated across to the new server - would this no longer be possible?

That's the version I recommend. It is compatible with previous versions and will run properly with the newer versions of php and mysql. It is also 100% compatible with other contributions you may install, without having to apply "fixes," and has options no other rewriter has, which can help with the SEO of your site.

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

Hi

I installed ultimate seo urls 22_d9 it worked with english names correctly but when I tried to use Persian (like arabic) characters , then the name of product urls changed to number ! now it will not working anymore. what happened? :(

 

Any help for other languages? :(

Link to comment
Share on other sites

That's the version I recommend. It is compatible with previous versions and will run properly with the newer versions of php and mysql. It is also 100% compatible with other contributions you may install, without having to apply "fixes," and has options no other rewriter has, which can help with the SEO of your site.

 

V2.2d has as an added extra that it can pull data from header tags if you have installed it, well if I'd have seen the point USU5 would have added it too. Other than that only minusses. Perfectly reasonable of course for Jack_mcs to create a version that can use the data stored from his header tags contribution but in my opinion it should be marked as "Header Tags version" and not touted as "the best version" of Ultimate Seo Urls which, again, in my opinion it simply is not.

 

Sorry but Chemos series 2 is an old crock .. now nearly 3000 lines of old fashioned code dumping huge numbers of defines into the global scope . . repeated by storing the same in the class container, using questionable functions like exec() which are called a huge number of times, not acceptable in this day and age. When Chemo wrote this it was fine ( but buggy ) but now is just old functional code stored in a class.

 

Your statement is also incorrect, and let's get this fact straight, USU5 works perfectly with all correctly written contributions using the correct tep_href_link function. Those not using this function to create uris I have simply provided a "fix".

 

Other contributions that don't work namely are: -

 

All products SEO .. osCommerce filenames do not use hyphens they use underscores, all-products.php does not meet with osCommerce coding practises and therefore doesn't work until fixed. ( I could remove or lessen the security only accepting valid filenames but have no intention of doing so as it is all products that is incorrect. )

 

Header tags SEO, well this is simple it simply doesn't identify files correctly .. two examples ..

 

standard osC SEF url - mysite.com/index.php/cPath/1 -- perfectly valid won't work because header tag code fails to correctly deal with path based uris.

 

USU5 - mysite.com/index.php/my-great-category-c-42 fails for the same reason as the above.

 

Although header tags works ok when USU5 is producing standard seo urls of the type produced by series 2, for obvious reasons.

 

V2.2d still doesn't correctly 301 redirect all uri types.

 

Series 2 has no true development path, it is just continuing to become an even longer file with even more defines and seemingly more bugs ( even ones I solved back in 2.1d ORIGINAL UPDATED ) as non original contributors try to add functionality.

 

I see no benefit whatsoever to using 2005 code over USU5 ( excepting the decision to stay with PHP4 for whatever inexplicable reason ), especially not with the upcoming USU5 PRO with all its true mutli language capability, modern fast caching, 4 type of uris etc etc.

 

USU5 is also inherently more stable . . I have not seen a bug in months ( excepting large shop caching which is suffered more so by series 2 and handled in 5 PRO ) whereas series 2 just keeps adding to them.

 

Lastly for series 2 users I maintained a mission to free the old series 2 of bugs ( mainly added by contributors ) and keep it true to the original, I did this initially with 2.1d ORIGINAL UPDATED ( which Jack_mcs version is based on ). I later added Ultimate_Seo_Urls_2.1d_STABLE_FINAL_r172 which maintains the bug free development and reduces the ridiculous 3000 lines of code to just 1016 while adding true 301 redirection for the first time. For those who wish to remain on series 2 don't overlook Ultimate_Seo_Urls_2.1d_STABLE_FINAL_r172 which to my mind was the first "true" tidy up and consolidation of Chemos original incling all the bug fixes I solved while supporting 2.1d ORIGINAL UPDATED.

 

Remember in this contribution when you look at the shear number of "versions" you can download .. latest is most often not best. I have no interest in developing it ( for obvious reasons mentioned above ) but will continue to support it where users state they are using this version.

 

For those who are interested in true SEO multi language capability ( and all the other many benefits ) of Ultimate Seo Urls 5 PRO there is a development topic.

 

http://www.oscommerce.com/forums/topic/349814-ultimate-seo-urls-5-pro/

 

It is in the final stage of testing as very few bugs were found in what is a total ground up rewrite of USU5, if you post an intention to beta test in the support topic then send me a pm with your email, I will happily send you the latest revision. AS LONG as you are agreeing to beta test and feed back not "just having a look".

Edited by FWR Media
Link to comment
Share on other sites

Any help for other languages? :(

 

You cannot use special language characters in uris they have to be converted to a-z0-9.

 

Series 2 does this by a limited setting in admin.

 

USU5 does this by way of character conversion files allowing different conversions for the different languages of the site.

Edited by FWR Media
Link to comment
Share on other sites

Thanks for your responses Jack and FWR Media, I'll get to installing it and (hopefully) report back with an all clear :)

 

At this stage, I'm trying to get my site up off the ground asap, as I have a migration to new servers imminent. After this is taken care of, I plan on revisiting my site and starting afresh on RC2, at that stage I'll make the decisions about what is best for my site (I first set up my site about 3 years ago, so much of my code and addons are from then). What's most important is that new URL's are the same as old URL's, so as not to lose any work done on search engines etc.

 

I also have Jack's header tags installed - I'm fairly confident that it's a combination of this contribution and my insistence on fully describing each and every one of my products on my site (many others in the industry don't) that has put my site above my competitors who have very similar (code-wise) sites.

Link to comment
Share on other sites

Thanks for your responses Jack and FWR Media, I'll get to installing it and (hopefully) report back with an all clear :)

 

Ok, I've installed/upgraded (which was painless, just dropping in the new seo.class.php. However, I now have an issue on the site, I'm getting the "Too many redirects" error page (Too many redirects occurred trying to open “http://mysite/category-c-1.html”. This might occur if you open a page that is redirected to open another page which then is redirected to open the original page.) This is happening for category pages and product info pages. I have reset SEO URLs cache, I'm not sure where to go from here. I didn't change anything in the .htaccess file, it says:

 

Options +FollowSymLinks
RewriteEngine On 
RewriteBase /

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 ^(.*)-t-(.*).html$ articles.php?tPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-a-(.*).html$ article_info.php?articles_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 ^(.*)-i-(.*).html$ information.php?info_id=$2&%{QUERY_STRING}

Link to comment
Share on other sites

Ok, I've installed/upgraded (which was painless, just dropping in the new seo.class.php. However, I now have an issue on the site, I'm getting the "Too many redirects" error page (Too many redirects occurred trying to open “http://mysite/category-c-1.html”.

You didn't do a complete install. You need to follow the install instructions. They are the same, or very similar, as with previous versions but the code has changed.

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 didn't do a complete install. You need to follow the install instructions. They are the same, or very similar, as with previous versions but the code has changed.

 

No, I didn't, I just did an upgrade as I was going from V2.1. The upgrade instructions noted to replace the seo.class.php file, and then to call the site in my browser. It mentions to "Re-configure through the admin control panel", but I just presumed that was to confirm that you wanted the same settings, and to see if I wanted to use any of the new settings (which I didn't).

 

In any case, I found a spot in this thread where you advised uninstalling and reinstalling the contribution (using the options in the admin side), and then turning off all of the options. I have done this, and my site is working again, with the correct URL names. I've added my preferred settings back in (to cache categories and product info) and it's all good :)

Link to comment
Share on other sites

No, I didn't, I just did an upgrade as I was going from V2.1. The upgrade instructions noted to replace the seo.class.php file, and then to call the site in my browser. It mentions to "Re-configure through the admin control panel", but I just presumed that was to confirm that you wanted the same settings, and to see if I wanted to use any of the new settings (which I didn't).

 

In any case, I found a spot in this thread where you advised uninstalling and reinstalling the contribution (using the options in the admin side), and then turning off all of the options. I have done this, and my site is working again, with the correct URL names. I've added my preferred settings back in (to cache categories and product info) and it's all good :)

Those upgrade instructions are from the original author and haven't been changed in years (an oversight on my part). I'm glad it is working for you but if you haven't changed the rest of the code per the normal install, you are setting yourself up for possible problems. It only takes a few minutes to replace the other code for this contribution and I strongly suggest you do so.

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

Those upgrade instructions are from the original author and haven't been changed in years (an oversight on my part). I'm glad it is working for you but if you haven't changed the rest of the code per the normal install, you are setting yourself up for possible problems. It only takes a few minutes to replace the other code for this contribution and I strongly suggest you do so.

 

Ahhh, I honestly thought I'd done the right thing - whoops. Have installed (over the top of the original installation) and is now working great (realised after writing my last post that it wasn't really working - I was getting the redirect error after enabling "automatic redirects"). Doing a full install has fixed this.

 

I had an issue originally (PHP Warning: strpos(): Empty delimiter in /includes/classes/seo.class.php on line 2580), but found earlier in this thread advice recommending that in includes/configure.php DIR_WS_HTTP_CATALOG should be / (for an installation in the root) - somehow this had changed between my server copy and my local copy - all fixed now.

 

Thanks for your help Jack :)

Link to comment
Share on other sites

cPath and manufacturers_id are not being passed or not being recognised, why? I haven't a clue as it is down to your site coding. I presume you have the correct lines in .htaccess passing the above mentioned.

Out of curiosity - would you recommend installing SEO URLS Version 5? Might this clear up my problems?

Thanks!

-Alex

Hello,

I installed Ultimate SEO 2-2.2d-9.

My Category links and Manufacturer links do not work.

Also - I found that the "Click to Enlarge" feature in the product pages does not work as it should.

www.negative-existence.com

Any help would be appreciated. If this subject has already been discussed please point me to the solution.

Thanks!

-Alex

Link to comment
Share on other sites

Out of curiosity - would you recommend installing SEO URLS Version 5? Might this clear up my problems?

Thanks!

-Alex

 

Usually I'd say yes . .in your case it wouldn't make a jot of different as the issue is related to your site code.

 

 

The uri is coming in as e.g.

 

shirts-c-24.html

 

.htaccess converts this into a value understandable to osCommerce which is the standard ..

 

index.php?cPath=24

 

Your site is not recognising the _GET key cPath.

 

What happens when you turn off seo urls and use these standard link types?

Link to comment
Share on other sites

Usually I'd say yes . .in your case it wouldn't make a jot of different as the issue is related to your site code.

 

 

The uri is coming in as e.g.

 

shirts-c-24.html

 

.htaccess converts this into a value understandable to osCommerce which is the standard ..

 

index.php?cPath=24

 

Your site is not recognising the _GET key cPath.

 

What happens when you turn off seo urls and use these standard link types?

 

 

When I select "False" on "Enable SEO URLS" I get a "The page isn't redirecting properly" message from my browser.

 

What is very strange is that I was able to create a new category that works correctly. From there I was able to use all of my previous categories by making them subcategories within the new category... so there is a workaround to the category problem.

 

I still have issues with the Manufactures and Click to Enlarge features.

 

Thanks for the help.

-Alex

Link to comment
Share on other sites

Here is an issue...

The following links are the same product.

 

http://negative-existence.com/store-c-42.html

http://negative-existence.com/-p-42.html

 

 

therefore "C" & "P" and perhaps "M" are all searching for the product with the corresponding number (which are out of stock) - leading to the "Product not found" message.

Edited by negativeexistence
Link to comment
Share on other sites

When I select "False" on "Enable SEO URLS" I get a "The page isn't redirecting properly" message from my browser.

 

What is very strange is that I was able to create a new category that works correctly. From there I was able to use all of my previous categories by making them subcategories within the new category... so there is a workaround to the category problem.

 

I still have issues with the Manufactures and Click to Enlarge features.

-Alex

Turn off all of the options in the SEO URLs and try it. If your links don't work with it off, there is some problem in the shops code. If it does work, turn on just the top enable option and see what happens.

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