Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

ULTIMATE Seo Urls 5 - by FWR Media


Recommended Posts

Hi FWR,

 

I have the latest version of USU5 pro installed on oscommerce v.2.3.1 and i wanted to ask a question regarding how the latest version handles redirects as it seems to operate slightly differently from an older version of USU5 i have on another site.

 

On this new site with the latest version of USU5 if i manually change the URL in the browser from say product-name-p-12.html to -p-12.html i get a 404 page where as on the site with the older version it will redirect to product-name-p-12.html on just -p-12.html. On the latest version it will only redirect if at least one letter is before the hyphen like z-p-12.html but it can be any letter.

 

Please could you advise if this is an intentional new way of redirecting or if it is a problem with my setup? I have tried turning Output W3C valid URLs? Force www.mysite.com/ when www.mysite.com/index.php and Remove all non-alphanumeric characters? both true and false with no joy.

 

Everything operates fine apart from this small issue.

Link to comment
Share on other sites

Hi,

 

I installed your contribution and everything works fine except for the categories and products. The main page and the menu items work perfectly, when I click on a product and/or category it shows an "page not found". I also edited the .htaccess file with the following 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>

 

I am working the the 2.3.1 version. Can someone please help me?

 

Gr, Aarsvaars

 

I also figured out that when I put the "Choose the uri format" to standard, the links to products and categories don't work aswell. If someone can point me in the right direction, please.

 

Gr, Aarsvaars

Link to comment
Share on other sites

Very nice and cleaver contribution. Installation went easy following the included instructions and everything works fine, excepted the sitemap generation. I have a multilanguage - 4 languages - shop. Products and categories have different names in each language. urls are well formated on site but sitemaps allthough the detect the language, they serve the first met language names. I try to be more clear with an exemple, lets say:

 

category_id : 21

category's german name: bücher

category's english name: books

category's french names: livres

on site urls :

http://mysite/de/bücher-c-21.html

http://mysite/books-c-21.html

http://mysite/fr/livres-c-21.html

 

Sitemaps

http://mysite/de/bücher-c-21.html

http://mysite/bücher-c-21.html

http://mysite/fr/bücher-c-21.html

 

It seems like the Usu5_Bootstrap::i()->bootStrapper( $lng ) doesn't initiates correctly but I am not able to fix it not to track something through the objects. Any help greatly welcome.

 

Hello... in (and in all other page modules) page_modules/product_info.php just comment out Line 89 to 94:

//       if (  false !== $final_text_array = Usu_Main::i()->getVar( 'registry' )->retrieve( $this->key, $this->keys_index[$this->key] ) ) {
//         if ( Usu_Main::monitorPerformance() ) {
//           Usu_Main::$performance['queries_saved']++;
//         }
//         return $final_text_array;
//       }

 

Robert, could you please explain me the use of this if clause so I can exclude any negative effects?

life long and knusper

Link to comment
Share on other sites

In the interests of security, I have changed the names of almost all root PHP scripts.

 

USU5 is working fine for me except for the fact that generated URLs stay in the original format (product_id etc)

 

If I set everything to revert to 'product_info.php', then it behaves as I would expect.

 

Since all references are to FILENAME_PRODUCT_INFO, this is a mystery.

 

Any thoughts.

Link to comment
Share on other sites

In the interests of security, I have changed the names of almost all root PHP scripts.

 

USU5 is working fine for me except for the fact that generated URLs stay in the original format (product_id etc)

 

If I set everything to revert to 'product_info.php', then it behaves as I would expect.

 

Since all references are to FILENAME_PRODUCT_INFO, this is a mystery.

 

Any thoughts.

Upgraded to r205. Same problem.

Edited by cornishpirate
Link to comment
Share on other sites

Hi All

 

I've installed USU5 on 2.3 having used Chemo's original on my original, recently hacked, site (as if life isn't difficult enough without these twerps :angry: ).

 

The product pages are working as before and my htaccess seems ok as products are like this: www.mysite.com/product-p-1234.html

 

My category pages, however, steadfastly refuse to play ball and are like this: www.mysite.com/catalog.php?cPath=216

 

index.php is renamed to catalog.php in my install and my htaccess reflects this.

 

I'm sure that it is a dumb mistake on my part but I'd be grateful for any pointers to stem the tears.........

 

Keep up the good work everyone.

Link to comment
Share on other sites

I have installed Ultimate SEO URLs 5 Pro and everything seems to work perfectly. Thank you. Now I am trying to find a google base feed that works. Can someone point me to a contribution that works with this wonderful contribution? I have spent the better part of the day searching for a solutions and now I am just frustrated. Any help will be greatly appreciated.

 

V J

-- A ship in a harbor is safe, but that is not a ships ultimate purpose.

Link to comment
Share on other sites

It's late and i'm tired, and i'm new ! Hopefully that's enough excuses to cover my asking such a basic and silly question .... i want to install USU5 on to my new 2.3 database (with a few add-ons just added). I can't for the life of me figure out if r205 is a complete version or whether i need to start with the 22DEC10 initial version first ? Sorry ....

 

but thanks,

Christine

Link to comment
Share on other sites

It's late and i'm tired, and i'm new ! Hopefully that's enough excuses to cover my asking such a basic and silly question .... i want to install USU5 on to my new 2.3 database (with a few add-ons just added). I can't for the life of me figure out if r205 is a complete version or whether i need to start with the 22DEC10 initial version first ? Sorry ....

 

but thanks,

Christine

 

All are complete versions.

Link to comment
Share on other sites

Hi All

 

I've installed USU5 on 2.3 having used Chemo's original on my original, recently hacked, site (as if life isn't difficult enough without these twerps :angry: ).

 

The product pages are working as before and my htaccess seems ok as products are like this: www.mysite.com/product-p-1234.html

 

My category pages, however, steadfastly refuse to play ball and are like this: www.mysite.com/catalog.php?cPath=216

 

index.php is renamed to catalog.php in my install and my htaccess reflects this.

 

I'm sure that it is a dumb mistake on my part but I'd be grateful for any pointers to stem the tears.........

 

Keep up the good work everyone.

 

Perhaps you have category caching on and have not reset the cache?

Link to comment
Share on other sites

Upgraded to r205. Same problem.

 

You have made changes to the core system changing the filenames of files which are expected by USU5.

Link to comment
Share on other sites

Hi Robert

 

Thanks for the suggestion but I have reset the cache after each change of setting.

 

I wasn't aware that I could separate category caching from product caching but when I add cPath to product URLs in the settings, the category path is still numeric despite the product being SEO'd.

 

Mark

Link to comment
Share on other sites

Hi Robert

 

Thanks for the suggestion but I have reset the cache after each change of setting.

 

I wasn't aware that I could separate category caching from product caching but when I add cPath to product URLs in the settings, the category path is still numeric despite the product being SEO'd.

 

Mark

 

Mark

 

USU5 will ALWAYS produce an SEO URI for categories just so long as the code is correct: -

 

1) The correct osCommerce link wrapper is used tep_href_link();

2) tep_href_link() is used correctly e.g.

tep_href_link( FILENAME_DEFAULT, 'cPath=23' );

 

Static caching is the only exception, e.g. if the categories html is cached then USU5 will never be called upon to build the URIs.

Link to comment
Share on other sites

Hi Robert,

 

Could you please help me with my problem as stated below:

 

I also figured out that when I put the "Choose the uri format" to standard, the links to products and categories don't work aswell. If someone can point me in the right direction, please.

 

Gr, Aarsvaars

 

EDIT: Can't seem to quote my whole previous message. The problem is that when I enable your contribution the product and category links aren't working. I tried to adjust every option in the control panel and I edited the htaccess as instructed.

Edited by Aarsvaars
Link to comment
Share on other sites

Hi Robert,

 

Could you please help me with my problem as stated below:

 

 

 

EDIT: Can't seem to quote my whole previous message. The problem is that when I enable your contribution the product and category links aren't working. I tried to adjust every option in the control panel and I edited the htaccess as instructed.

 

"product and category links aren't working" is not descriptive enough for me to try and help.

 

Basically .. if the uri format is standard then .htaccess will have no effect, if the links are not loading the required page then most likely your server is set up to NOT accept path based URIs and you may need to add to .htaccess: -

AcceptPathInfo On

 

If however the uri format is set to rewrite, the URIs are being produced correctly but the links are not loading the correct page then the issue will be one of the following in order of likelyhood: -

 

  • RewriteBase is incorrectly set
  • The server is IIS and needs a module added to allow RewriteRules
  • mod_rewrite module is not compiled.

Edited by FWR Media
Link to comment
Share on other sites

"product and category links aren't working" is not descriptive enough for me to try and help.

 

Basically .. if the uri format is standard then .htaccess will have no effect, if the links are not loading the required page then most likely your server is set up to NOT accept path based URIs and you may need to add to .htaccess: -

AcceptPathInfo On

 

If however the uri format is set to rewrite, the URIs are being produced correctly but the links are not loading the correct page then the issue will be one of the following in order of likelyhood: -

 

  • RewriteBase is incorrectly set
  • The server is IIS and needs a module added to allow RewriteRules
  • mod_rewrite module is not compiled.

 

I put the uri format to standard and added the htacces code "AcceptPathInfo on". I still get the error messages when clicking on categories and products.

Link to comment
Share on other sites

Mark

 

USU5 will ALWAYS produce an SEO URI for categories just so long as the code is correct: -

 

1) The correct osCommerce link wrapper is used tep_href_link();

2) tep_href_link() is used correctly e.g.

tep_href_link( FILENAME_DEFAULT, 'cPath=23' );

 

Static caching is the only exception, e.g. if the categories html is cached then USU5 will never be called upon to build the URIs.

 

Still no luck understanding this one - my replacements all look ok and only the categories don't get replaced.

 

Is there a 'setting' that I am missing here as I can add and subtract detail from the product listing with gay abandon but category is always represented as cPath=216 even is I append it to the product.

 

I checked my configuration files and hta files and all refer to catalog.php as FILENAME_DEFAULT - the only one that is different is FILENAME_HOME which refers to index.php as that is where the 'real' homepage is located.

 

Rather than make this our life's mission, I've read others requesting to leave the category pages unchanged - is that perceived to have some seo benefit - in which case, shall I just stop driving everyone mad?!!

 

Thanks for the great work.

Link to comment
Share on other sites

Hi Robert,

 

I've installed Ultimate SEO URLS 5 PRO and everything is working well except when I process a payment. After the payment is accepted by the payment gateway, on the redirect to my site I am directed to the login page instead of through to checkout_success. I'm running v2.2 RC2a and using the DPS PxPay payment module. The payment process works ok when the contribution is removed. Any ideas?

 

Thanks!

Link to comment
Share on other sites

Hi Robert

 

Still trying to fathom this one out and, here's where I am...

 

Using the reporting tool I can see that it runs the [products_id] => Array code from the page modules but not the category one.

 

I'd say that rather than running the code in page_modules/index.php and getting errored back to the standard tep_href_link() that in my instance there is something preventing the index.php page module being run at all - I presume that I would see this in the error reporting.

 

I did think that I had found a sliver of hope in a hard-coded reference to root/index.php in the changes to catalog/includes/application_top.php

 

// Some odd server set ups return / for SCRIPT_NAME and PHP_SELF when accessed as mysite.com (no index.php) where they usually return /index.php

if ( ( $_SERVER['SCRIPT_NAME'] == '/' ) || ( $_SERVER['PHP_SELF'] == '/' ) ) {

return 'index.php';

}

 

As my index page is catalog.php I thought that I may have an 'odd server set up' but as the products are working fine, I think that is a red herring.

 

Is there some significance in the page modules being named after their normal namesakes and that somewhere page_modules/index.php can't match up with catalog.php?

 

I'm so close that I'd really rather not give up!

 

Mark

post-72021-0-94782300-1314289976_thumb.jpg

Link to comment
Share on other sites

Hi FWR,

 

I have the latest version of USU5 pro installed on oscommerce v.2.3.1 and i wanted to ask a question regarding how the latest version handles redirects as it seems to operate slightly differently from an older version of USU5 i have on another site.

 

On this new site with the latest version of USU5 if i manually change the URL in the browser from say product-name-p-12.html to -p-12.html i get a 404 page where as on the site with the older version it will redirect to product-name-p-12.html on just -p-12.html. On the latest version it will only redirect if at least one letter is before the hyphen like z-p-12.html but it can be any letter.

 

Please could you advise if this is an intentional new way of redirecting or if it is a problem with my setup? I have tried turning Output W3C valid URLs? Force www.mysite.com/ when www.mysite.com/index.php and Remove all non-alphanumeric characters? both true and false with no joy.

 

Everything operates fine apart from this small issue.

 

Further to my previous post above. I have moved hosts and on a fresh install it is still displaying the same behaviour so please could anyone who has oscommerce 2.3 and the latest version of USU5 pro(r205) installed please take just 10 seconds to check the following for me:

 

Go to your home page ie. www.yoursite.com

Click on any category/product/manufacturer ie. www.yoursite.com/category-c-1.html

In your browser manually change the URL to ie. www.yoursite.com/-c-1.html

Press enter

 

Do you get a 404 page not found or does the URL change back to www.yoursite.com/category-c-1.html?

 

Also is anyone using the manual 301 redirects in includes/modules/ultimate_seo_urls5/includes/uri_redirects_array.php? Does it work for you? I can't get anything to 301 redirect even the examples given in the original file, which is:

 

<?php
 /**
 *
 * ULTIMATE Seo Urls 5 PRO ( version 1.1 )
 *
 *
 * @package USU5_PRO
 * @license http://www.opensource.org/licenses/gpl-2.0.php GNU Public License
 * @link http://www.fwrmedia.co.uk
 * @copyright Copyright 2008-2009 FWR Media
 * @copyright Portions Copyright 2005 ( rewrite uri concept ) Bobby Easland
 * @author Robert Fisher, FWR Media, http://www.fwrmedia.co.uk
 * @lastdev $Author:: Rob                                          	$:  Author of last commit
 * @lastmod $Date:: 2010-12-21 22:45:02 +0000 (Tue, 21 Dec 2010)   	$:  Date of last commit
 * @version $Rev:: 196                                     			$:  Revision of last commit
 * @Id $Id:: uri_redirects_array.php 196 2010-12-21 22:45:02Z Rob  	$:  Full Details  
 */

 /**
 * Array of URIs to be 301 redirected
 * @package USU5_PRO
 * @example 'hardware-c-99'  => array( 'index.php', 'cPath=1' ) redirects the specific uri hardware-c-99 to the current uri for cPath=1
 */
 /*
 $usu5_uri_redirects = array( 'hardware-c-99'  => array( 'index.php', 'cPath=1' ),
                  			'hardware-c-101' => array( 'index.php', 'cPath=1' ),
                  			'de/hardware-c-101' => array( 'index.php', 'cPath=1' ) );
 */

 

I have tried removing the /* and */ but no matter what i do i can't get anything to 301 redirect. Also should the old URL like hardware-c-99 in the example above not be hardware-c-99.html? I have tried it with and without anyway but as i say nothing will 301 redirect i just get a 404 page not found.

 

Every other part of the contribution is working perfectly. The weird thing is i have other websites with older versions of USU 5 that redirect -c-1.html correctly and manual 301 redirects work perfectly so i don't understand why with this latest version i am havng these issues. I have root access to the server so can change anything if required. I need to get manual 301 redirects working because i don't have control over my categories so they could be changed at anytime and i need to be able to 301 redirect from the old categories to the new ones.

 

Thank you.

Edited by annuity
Link to comment
Share on other sites

 

Further to my previous post above. I have moved hosts and on a fresh install it is still displaying the same behaviour so please could anyone who has oscommerce 2.3 and the latest version of USU5 pro(r205) installed please take just 10 seconds to check the following for me:

 

Go to your home page ie. www.yoursite.com

Click on any category/product/manufacturer ie. www.yoursite.com/category-c-1.html

In your browser manually change the URL to ie. www.yoursite.com/-c-1.html

Press enter

 

Do you get a 404 page not found or does the URL change back to www.yoursite.com/category-c-1.html?

 

Also is anyone using the manual 301 redirects in includes/modules/ultimate_seo_urls5/includes/uri_redirects_array.php? Does it work for you? I can't get anything to 301 redirect even the examples given in the original file, which is:

 

<?php
 /**
 *
 * ULTIMATE Seo Urls 5 PRO ( version 1.1 )
 *
 *
 * @package USU5_PRO
 * @license http://www.opensource.org/licenses/gpl-2.0.php GNU Public License
 * @link http://www.fwrmedia.co.uk
 * @copyright Copyright 2008-2009 FWR Media
 * @copyright Portions Copyright 2005 ( rewrite uri concept ) Bobby Easland
 * @author Robert Fisher, FWR Media, http://www.fwrmedia.co.uk
 * @lastdev $Author:: Rob                                          	$:  Author of last commit
 * @lastmod $Date:: 2010-12-21 22:45:02 +0000 (Tue, 21 Dec 2010)   	$:  Date of last commit
 * @version $Rev:: 196                         						$:  Revision of last commit
 * @Id $Id:: uri_redirects_array.php 196 2010-12-21 22:45:02Z Rob  	$:  Full Details  
 */

 /**
 * Array of URIs to be 301 redirected
 * @package USU5_PRO
 * @example 'hardware-c-99'  => array( 'index.php', 'cPath=1' ) redirects the specific uri hardware-c-99 to the current uri for cPath=1
 */
 /*
 $usu5_uri_redirects = array( 'hardware-c-99'  => array( 'index.php', 'cPath=1' ),
      						'hardware-c-101' => array( 'index.php', 'cPath=1' ),
      						'de/hardware-c-101' => array( 'index.php', 'cPath=1' ) );
 */

 

I have tried removing the /* and */ but no matter what i do i can't get anything to 301 redirect. Also should the old URL like hardware-c-99 in the example above not be hardware-c-99.html? I have tried it with and without anyway but as i say nothing will 301 redirect i just get a 404 page not found.

 

Every other part of the contribution is working perfectly. The weird thing is i have other websites with older versions of USU 5 that redirect -c-1.html correctly and manual 301 redirects work perfectly so i don't understand why with this latest version i am havng these issues. I have root access to the server so can change anything if required. I need to get manual 301 redirects working because i don't have control over my categories so they could be changed at anytime and i need to be able to 301 redirect from the old categories to the new ones.

 

Thank you.

 

As I can't PM Robert and i first posted on here on 16th August without reply, if there are any coders out there reading this please reply on this thread or PM me with a quote as i need to get these 2 small issues fixed and move on with my life. Time is money.

 

I need www.domainname.com/-c-1.html to redirect to www.domainname.com/category-name-c-1.html. This is for twitter links.

 

I need manual 301 redirects to work as my categories can get deleted at anytime and i need to be able to manually redirect the old urls without clogging up the .htaccess file.

 

Thank you

Edited by annuity
Link to comment
Share on other sites

Hello

 

Thanks for taking time to read this,

 

I have been using this great add on until yesterday the site was working fine but today I am getting this message on the homepage

 

 

Warning: Sqlite_Cache_Module::createDatabase() [sqlite-cache-module.createdatabase]: It is not

 

safe to rely on the system's timezone settings. You are *required* to use the date.timezone

 

setting or the date_default_timezone_set() function. In case you used any of those methods and

 

you are still getting this warning, you most likely misspelled the timezone identifier. We

 

selected 'Europe/London' for 'BST/1.0/DST' instead in

 

/home/mydomaincouk/public_html/includes/modules/ultimate_seo_urls5/cache_system/sqlite.php on line

 

103

 

Fatal error: Class 'SQLiteDatabase' not found in

 

/home/mydomaincouk/public_html/includes/modules/ultimate_seo_urls5/cache_system/sqlite.php on line

 

103

 

 

Please can someone explain what this error is and how can I resolve it.

 

Kind Regards

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