Jump to content
FWR Media

ULTIMATE Seo Urls 5 - by FWR Media

Recommended Posts

Ultimate Seo Urls 5 PRO

 

Total rewrite using modern PHP 5 code, compatible PHP 5.2.X through to the latest version of PHP, error free.

 

See a comparison guide:

http://www.fwrmedia.co.uk/scripts/docs/usu5pro_comparison/

 

Download here:

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

 

PhpDocumentor:

http://www.fwrmedia.co.uk/scripts/docs/usu5_pro/

 

Quick overview:

 

Compatibility:

PHP 5.2/5.3 ( PHP 4 will NOT work )

osCommerce 2.2

osCommerce 2.3.X

*nix and IIS servers

Old seo urls can be replicated ( USU5 or Chemos series 2 ) so you do not lose current indexing.

 

Main Benefits:

Multi language SEO capability. ( different languages individually indexed for the first time ).

4 Different uri types to choose from.

49 different ways to write the product uri text.

301 redirection and url validation. ( avoid SEO penalties ).

Choose from 4 different fast cache systems.

www.mysite.com/ will 301 redirect to www.mysite.com/index.php removing the chance of duplicate penalties.

Proper 404 header/page for "product/category etc. not found"

Modern, error free PHP 5.2/3 modular code.

Full easy install instructions for:

 

  • osCommerce 2.2
  • osCommerce 2.3.X
  • Upgrade from Chemos old series 2 Seo Urls
  • Upgrade from USU5 by FWR Media

Contributions supported ( will produce seo urls ):

 

  • Articles manager
  • Links manager
  • Information Pages
  • Newsdesk

 

Multi Language SEO Capability:

 

Seperate indexing of different languages through language specific Seo Urls.

 

English index.php

www.mysite.com/index.php

 

German index.php

www.mysite.com/index.php/de

 

English product seo url

www.mysite.com/my-great-product-c-22.html

 

German product seo url

www.mysite.com/de/my-greatgerman-product-c-22.html

 

4 Different Uri Types:

 

Traditional Seo Urls:

www.mysite.com/my-great-product-p-32.html

 

Path Rewrite: ( see 49 different ways to write the product uri text )

www.mysite.com/rebok/trainers/my-great-product-p-32.html

 

Standard: ( Works on *nix and Windows servers without rewrite ability )

www.mysite.com/index.php/my-great-product-p-32

 

Path Standard: ( Works on *nix and Windows servers without rewrite ability, see 49 different ways to write the product uri text )

www.mysite.com/index.php/rebok/trainers/my-great-product-p-32

 

49 different ways to write the product uri text:

 

Any combination of the following can be used to make up your product uri text in any order.

 

  • p ( products name )
  • b ( brand/manufacturers name )
  • c ( category name )
  • m ( products model )

So a setting in admin of bcmp would create uri link text like ..

 

manufacturer-category-model-product

 

Or with the path methods ..

 

manufacturer/category/model/product

 

Seo Force index.php:

 

www.mysite.com/ will automatically 301 redirect to www.mysite.com/index.php removing the chance of duplicate penalties.

Beware: on some servers this creates a redirect loop, turn it on and try to access your site like www.mysite.com/index.php, if you get a loop then turn it off.

Complete 301 redirection:

 

All uri types are covered for 301 redirection so if you install this for the first time or change your uri type you can rest assured the bots will be 301 redirected to the new uri preserving your page rank. Uri types covered are ..

 

Standard osC urls

osC experimental search engine friendly urls

Traditional seo Urls

Path Rewrite urls

Standard seo urls

Path standard seo urls

Uri validation:

 

Change a product name with the old series 2 urls and you are stuffed because ..

aardwark-32.html accesses successfully the same page as dodo-32.html, needless to say this is very bad for seo.

 

With USU5 if you ever change a product name or change the link text USU5 will 301 redirect to the currently correct seo url for that product/category.

 

Proper 404 pages for "product/category etc. not found":

 

USU5 displays a custom 404 page complete with the correct 404 header when a link comes in where the product/category cannot be found .. the standard osC/seo urls 2 way of dealing with this is to show the page with product not found .. loads of duplicate content.

 

Far more efficient caching should be ideal for large shops with thousands of products:

 

The caching strategy has been refined so that cache data is built on a page by page basis. This means much smaller cache data even on huge shops, leading to more speed and efficiency.

 

4 Different cache systems:

 

Choose which cache system works best for you.

 

  • File based - no database access so good if you have an overworked MySQL database
  • SQLite - Very fast and efficient file based database, same benefit as file based but using a modern fast database system.
  • The one downside with SQLite is that it is dramatically slow when there are concurrent read/write operations. What this means is it will be slow when the cache is building but after the cache is fully loaded will be extremely fast.
  • MySQL - No reason not to use this if your database is not overworked.
  • Memcache - Ultra fast memory based system, this option is really only for those on dedicated or VPS servers.

Edited by FWR Media

Share this post


Link to post
Share on other sites

Hi,

 

Got a problem, I installed using the upgrade instructions from Ultimate Seo Urls 5...

 

Been through the instructions which are pretty straightforward and I now get a 500 Internal Server Error..

 

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webadmin@kundenserver.de and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request. 

 

So I removed the htaccess as a test and get this error:

 

Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /homepages/56/ghjghjg/htdocs/www/includes/application_top.php on line 346

 

 

Which refers to:

 

 Usu_Main::i()->setVar( 'languages_id', $languages_id )

 

I am using 1&1 webhosting where you have to add the 2 extra lines to the root .htaccess file for php 5 functionality bearing in mind the older fwr seo url's worked fine:

 

    AddType x-mapp-php5 .php
   AddHandler x-mapp-php5 .php

 

 

 

After running phpinfo(); returns that it is using PHP Version 5.2.14..

 

Please help!

 

Chris

Edited by chrish123

Share this post


Link to post
Share on other sites

Hi,

 

Got a problem, I installed using the upgrade instructions from Ultimate Seo Urls 5...

 

Been through the instructions which are pretty straightforward and I now get a 500 Internal Server Error..

 

 

After running phpinfo(); returns that it is using PHP Version 5.2.14..

 

Please help!

 

Chris

 

No reason for any error .. it runs on the old PHP5.2.0

 

Do you get this error loading the index or just on seo urls?

 

On some hosts you may have to comment out the following line in .htaccess ..

 

#Options +SymLinksIfOwnerMatch

Edited by FWR Media

Share this post


Link to post
Share on other sites

No reason for any error .. it runs on the old PHP5.2.0

 

Do you get this error loading the index or just on seo urls?

 

 

Hi, It happens when loading the index after completing the upgrade, it instantly gives a 500 internal server error, until I remove the htaccess file then I get the error that refers to: Usu_Main::i()->setVar( 'languages_id', $languages_id )

Share this post


Link to post
Share on other sites

Hi, It happens when loading the index after completing the upgrade, it instantly gives a 500 internal server error, until I remove the htaccess file then I get the error that refers to: Usu_Main::i()->setVar( 'languages_id', $languages_id )

 

The only error is the 500 the other relates to reverting to PHP4 which hasn't a chance of working.

 

I added to my post above yours.

Share this post


Link to post
Share on other sites

The only error is the 500 the other relates to reverting to PHP4 which hasn't a chance of working.

 

I added to my post above yours.

 

 

Hi, Thanks, I tried that and no joy unfortunately, 1&1 has PHP 4 by default until you add the lines to the htaccess as it is run as a CGI and you can apparently upload your own php.ini to your website folder, however I dont know what can be done to get this to work. Its strange as according to the phpinfo it is running php5 and all other php5 scripts have worked which is odd.

Edited by chrish123

Share this post


Link to post
Share on other sites

Hi, Thanks, I tried that and no joy unfortunately, 1&1 has PHP 4 by default until you add the lines to the htaccess as it is run as a CGI and you can apparently upload your own php.ini to your website folder, however I dont know what can be done to get this to work. Its strange as according to the phpinfo it is running php5 and all other php5 scripts have worked which is odd.

 

What happens when you remove only the USU5 code from .htaccess?

Share this post


Link to post
Share on other sites

What happens when you remove only the USU5 code from .htaccess?

 

 

Ah hah! Its now displaying the site... ps the server is Linux

Edited by chrish123

Share this post


Link to post
Share on other sites

Ah hah! Its now displaying the site...

 

Ok ask your hosts what the server doesn't like about the code.

 

Usually it's Options +FollowSymLinks but USU5 PRO doesn't use that.

Share this post


Link to post
Share on other sites

Ok ask your hosts what the server doesn't like about the code.

 

Usually it's Options +FollowSymLinks but USU5 PRO doesn't use that.

 

 

Hey, Thank you for your help, it's very much appreciated as is the mod you have created and distributed for free, hopefully this solution/debugging helps someone else too, It must be the difference in the htaccess rewrite between the old and new code, the older htaccess rewrite code worked fine..

 

 

fwr seo url's 5 r141:

 

# If you are getting errors you may need to comment this out like ..
# Options +FollowSymLinks
Options +FollowSymLinks
<IfModule mod_rewrite.c>
 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 RewriteBase using the instructions above  
 RewriteBase /

 RewriteRule ^(.*)-p-([0-9]+).html$ product_info.php?products_id=$2&%{QUERY_STRING}
 RewriteRule ^(.*)-c-([0-9_]+).html$ index.php?cPath=$2&%{QUERY_STRING}
 RewriteRule ^(.*)-m-([0-9]+).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}
 RewriteRule ^(.*)-pi-([0-9]+).html$ popup_image.php?pID=$2&%{QUERY_STRING}
 RewriteRule ^(.*)-pr-([0-9]+).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}
 RewriteRule ^(.*)-pri-([0-9]+).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING}
 # Articles contribution
 RewriteRule ^(.*)-t-([0-9_]+).html$ articles.php?tPath=$2&%{QUERY_STRING}
 RewriteRule ^(.*)-a-([0-9]+).html$ article_info.php?articles_id=$2&%{QUERY_STRING}
 # Information pages
 RewriteRule ^(.*)-i-([0-9]+).html$ information.php?info_id=$2&%{QUERY_STRING}
 # Links contribution
 RewriteRule ^(.*)-links-([0-9_]+).html$ links.php?lPath=$2&%{QUERY_STRING}
 # Newsdesk contribution
 RewriteRule ^(.*)-n-([0-9]+).html$ newsdesk_info.php?newsdesk_id=$2&%{QUERY_STRING}
 RewriteRule ^(.*)-nc-([0-9]+).html$ newsdesk_index.php?newsPath=$2&%{QUERY_STRING}
 RewriteRule ^(.*)-nri-([0-9]+).html$ newsdesk_reviews_info.php?newsdesk_id=$2&%{QUERY_STRING}
 RewriteRule ^(.*)-nra-([0-9]+).html$ newsdesk_reviews_article.php?newsdesk_id=$2&%{QUERY_STRING}
</IfModule>

 

and this new htaccess code:

 

# If you are getting errors you may need to comment this out like ..
# Options +FollowSymLinks
Options +SymLinksIfOwnerMatch
<IfModule mod_rewrite.c>
 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 RewriteBase using the instructions above  
 RewriteBase / 
 RewriteRule ^([a-z0-9-/]+)-p-([0-9]+).html$ product_info.php [NC,L,QSA]
 RewriteRule ^([a-z0-9-/]+)-c-([0-9_]+).html$ index.php [NC,L,QSA]
 RewriteRule ^([a-z0-9-/]+)-m-([0-9]+).html$ index.php [NC,L,QSA]
 RewriteRule ^([a-z0-9-/]+)-pi-([0-9]+).html$ popup_image.php [NC,L,QSA]
 RewriteRule ^([a-z0-9-/]+)-pr-([0-9]+).html$ product_reviews.php [NC,L,QSA]
 RewriteRule ^([a-z0-9-/]+)-pri-([0-9]+).html$ product_reviews_info.php [NC,L,QSA]
 # Articles contribution
 RewriteRule ^([a-z0-9-/]+)-t-([0-9_]+).html$ articles.php [NC,L,QSA]
 RewriteRule ^([a-z0-9-/]+)-au-([0-9]+).html$ articles.php [NC,L,QSA]
 RewriteRule ^([a-z0-9-/]+)-a-([0-9]+).html$ article_info.php [NC,L,QSA]
 # Information pages
 RewriteRule ^([a-z0-9-/]+)-i-([0-9]+).html$ information.php [NC,L,QSA]
 # Links contribution
 RewriteRule ^([a-z0-9-/]+)-links-([0-9_]+).html$ links.php [NC,L,QSA]
 # Newsdesk contribution
 RewriteRule ^([a-z0-9-/]+)-n-([0-9]+).html$ newsdesk_info.php [NC,L,QSA]
 RewriteRule ^([a-z0-9-/]+)-nc-([0-9]+).html$ newsdesk_index.php [NC,L,QSA]
 RewriteRule ^([a-z0-9-/]+)-nri-([0-9]+).html$ newsdesk_reviews_info.php [NC,L,QSA]
 RewriteRule ^([a-z0-9-/]+)-nra-([0-9]+).html$ newsdesk_reviews_article.php [NC,L,QSA]
</IfModule>

 


Share this post


Link to post
Share on other sites

Hey, Thank you for your help, it's very much appreciated as is the mod you have created and distributed for free, hopefully this solution/debugging helps someone else too, It must be the difference in the htaccess rewrite between the old and new code, the older htaccess rewrite code worked fine..

 

There's nothing wrong with the RewriteRules

 

The only difference really is ..

 

# Options +FollowSymLinks

Options +SymLinksIfOwnerMatch

 

Try ..

 

Options +FollowSymLinks

# Options +SymLinksIfOwnerMatch

Edited by FWR Media

Share this post


Link to post
Share on other sites

I tried both variations, but unfortunately it seems the host/server does not like that new rewrite code at all, is there any reason why a host would prevent using that?

Share this post


Link to post
Share on other sites

I tried both variations, but unfortunately it seems the host/server does not like that new rewrite code at all, is there any reason why a host would prevent using that?

 

You'll have to ask them. Perhaps you are using a bad editor to add the code to .htaccess you should use a flat file editor.

Edited by FWR Media

Share this post


Link to post
Share on other sites

You'll have to ask them. Perhaps you are using a bad editor to add the code to .htaccess you should use a flat file editor.

 

 

I use PSPAD. I will send them off an email and see what they say.

Share this post


Link to post
Share on other sites

This is what they said...

 

 

Thank you for contacting us. We are providing you the code below to parse to PHP 5 which need to be put in the first line of .htaccess file. If you encounter 500 internal server error message upon using the PHP 5, you will need to check the code under the RewriteRule. Please be informed that scripting is beyond our scope of support. However, if you try to put the php 5 code only in the .htaccess you will see that it works fine. Thank you. AddType x-mapp-php5 .php If you have any further questions please do not hesitate to contact us.

 

 

The AddType x-mapp-php5 .php is already in use as i wouldnt be able to load php5 files without it doh. They really didnt answer my question at all!

Share this post


Link to post
Share on other sites

This is what they said...

 

 

 

 

 

The AddType x-mapp-php5 .php is already in use as i wouldnt be able to load php5 files without it doh. They really didnt answer my question at all!

 

Ok typical level one support .. my wife knows more about servers and she doesn't know what a server is.

 

Having seen your .htaccess you have way too much crap in there .. I'm not at all surprised it doesn't work.

 

Have sent you something simpler to try.

Edited by FWR Media

Share this post


Link to post
Share on other sites

Ok typical level one support .. my wife knows more about servers and she doesn't know what a server is.

 

Having seen your .htaccess you have way too much crap in there .. I'm not at all surprised it doesn't work.

 

Have sent you something simpler to try.

 

 

Hello, Thanks but I tried exactly what you sent again, I also tried this earlier too and still get the original 500 internal server error.

 

This is using a Linux server, I'm just stumped as to why that rewrite code wont work, it has to be 1&1 specific.

 

Regards

Chris

Share this post


Link to post
Share on other sites

PS Forgot to say even using even one line of the url rewriting code makes the server throw the 500 error!

 

RewriteRule ^([a-z0-9-/]+)-p-([0-9]+).html$ product_info.php [NC,L,QSA]

 

But the code from the previous earlier version didnt?

Share this post


Link to post
Share on other sites

PS Forgot to say even using even one line of the url rewriting code makes the server throw the 500 error!

 

RewriteRule ^([a-z0-9-/]+)-p-([0-9]+).html$ product_info.php [NC,L,QSA]

 

But the code from the previous earlier version didnt?

 

Well ok .. I tried my best but there's nothing wrong with the code.

 

Get the server techies to sort it out.

Share this post


Link to post
Share on other sites

I am getting this error:

 

Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/fitness/www/includes/application_top.php on line 316

 

And when I want to start the Admin:

 

Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/fitness/www/hbf/includes/functions/general.php on line 1586

Edited by misa

Share this post


Link to post
Share on other sites

I am getting this error:

 

Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/fitness/www/includes/application_top.php on line 316

 

And when I want to start the Admin:

 

Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/fitness/www/hbf/includes/functions/general.php on line 1586

 

the contribution requires a minimum of PHP 5.2 ( version from way back in 2006 )

Edited by FWR Media

Share this post


Link to post
Share on other sites

Hello Robert,

 

In the new PRO version I think there may be the tiniest of omissions in the "upgrade from USU5 to USU5PRO directions" in step 2 it suggests to check these 2 directories are writable:

 

* catalog/includes/ultimate_seo_urls5/cache_system/cache/

* catalog/includes/ultimate_seo_urls5/cache_system/sqlite/

 

I believe there should be a /modules/ in there straight after /includes. This is pretty self evident from the step above but your directions are so complete they may as well be perfect.

 

 

I also received an error when I upgraded. My front page /index.php showed:

 

Catchable fatal error: Argument 1 passed to aPage_Modules::linkText() must be an array, null given, called in XXXXXXXX.com.au/includes/modules/ultimate_seo_urls5/page_modules/product_info.php on line 164 and defined in XXXXXXXX.com.au/includes/modules/ultimate_seo_urls5/abstracts/page_modules.php on line 323

 

I checked on line 164 and it showed:

 

->separateUriText( $this->linktext( $this->linkTextOrder( $link_text ) ) ), $this->dependencies[$this->key]['marker'], $this->keys_index[$this->key] ) );

 

Line 323 showed:

 

 

protected function linkText( array $array_of_texts ) {

 

 

All well beyond my abilities to faultfind so reverted back to the old version, but if there was something simple to try would like to.

 

Cheers Glen

Share this post


Link to post
Share on other sites

I believe there should be a /modules/ in there straight after /includes. This is pretty self evident from the step above but your directions are so complete they may as well be perfect.

 

Yup good catch thanks Glen.

 

I also received an error when I upgraded. My front page /index.php showed:

 

All well beyond my abilities to faultfind so reverted back to the old version, but if there was something simple to try would like to.

 

Cheers Glen

 

The query used by the products module is ..

 

SELECT pd.products_name, m.manufacturers_name, cd.categories_name, p.products_model, p2c.categories_id

FROM `products_description` pd

INNER JOIN `products_to_categories` p2c ON p2c.products_id = pd.products_id

INNER JOIN `products` p ON pd.products_id = p.products_id

LEFT JOIN `manufacturers` m ON m.manufacturers_id = p.manufacturers_id

INNER JOIN `categories_description` cd ON p2c.categories_id = cd.categories_id AND cd.language_id='LANGUAGE ID HERE'

WHERE pd.products_id='PRODUCTS ID HERE'

AND pd.language_id='LANGUAGE ID HERE'

LIMIT 1

 

You can copy that, fill in the bold bits and run it in phpMyAdmin, give it a go.

 

What is happening is at least one of your products is returning nothing, this is because the INNER JOIN I am using expects a result.

 

So one of your products doesn't have an entry in ..

products_description .. or ..

products_to_categories .. or ..

products [unlikely] .. or ..

categories_description

 

This should not be the case, in osCommerce all of those tables should have entries.

 

I believe changing all of the INNER JOIN to LEFT JOIN would solve your problem ( although the bcmp functionality wouldn't work as at least one is missing )..

 

ultimate_seo_urls5/page_modules/product_info.php .. line 37 .. replace with ..

 

 

                                                 			'query'  	=> "SELECT pd.products_name, m.manufacturers_name, cd.categories_name, p.products_model, p2c.categories_id FROM :TABLE_PRODUCTS_DESCRIPTION pd LEFT JOIN :TABLE_PRODUCTS_TO_CATEGORIES p2c ON p2c.products_id = pd.products_id LEFT JOIN :TABLE_PRODUCTS p ON pd.products_id = p.products_id LEFT JOIN :TABLE_MANUFACTURERS m ON m.manufacturers_id = p.manufacturers_id LEFT JOIN :TABLE_CATEGORIES_DESCRIPTION cd ON p2c.categories_id = cd.categories_id AND cd.language_id=':languages_id' WHERE pd.products_id=':pid' AND pd.language_id=':languages_id' LIMIT 1",

 

Still it seems your database has missing info.

 

Hope that helps.

Edited by FWR Media

Share this post


Link to post
Share on other sites

Thanks Robert, will go away and experiment. Cheers

 

Let me know how it goes.

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

×