Ultimate SEO URLs Documentation - originally by Chemo

Welcome to Ultimate SEO URLs contribution documentation!


What does this contribution do?

This contribution replaces the stock osCommerce method of creating URLs by passing the parameters (products_id, cPath, etc.) by creating static HTML file URLs.

Requirements

Version

This contribution, perhaps more than any other, has many different versions, some of which do not work properly. Usually, the higher the version number, the more recent the version. However, that is not the case with this contribution since various versions have taken different development paths. This series of versions, V 2-2.2d-X, is the closest to the original version and, I think, the most stable. It also doesn't require any special level of php and provides the best url's with regards to the search engines. Other versions add extra, unnecessary, text to the url, like /products/, which degrades the effectiveness of the rewrite. This version also has support for many common contributions. This is a big advantage over the versions that do not offer this option. If you request support for any of the versions, please be sure to state which version you are using since it can make a big difference in the answers you receive. This is the support thread.


INSTALLATION - Clean install on sterile osCommerce MS-2.2 through Bootstrap Edge

 


STEP #1 - Upload the class and update files

STEP #2 - Edit includes/application_top.php

Find this code:

Directly AFTER add this:


STEP #3 - Edit includes/functions/html_output.php

Find the tep_href_link() function. Your function may vary from what is shown. Just replace everything from the line starting with function... to right before the next line that starts that way:

And REPLACE with this function:


STEP #4 - Edit admin/categories.php

Find this code:

Directly AFTER add this:


STEP #5 - Edit admin/includes/functions/general.php

Add this code to the file just above the ending ?> tag:


STEP #6 - Edit .htaccess file (in your catalog directory)

If you don't have an .htaccess file in your catalog directory create one.

If your store is located in a DIRECTORY you will have to change the RewriteBase line

NOTE: you will have to edit the "directory" to match your directory name!


STEP #7 - Test the installation

Call your store in your favorite browser! The contribution should be functional out of the box and all database settings will be installed automatically on first page request. The contribution has an intelligent database installer that detects whether the proper settings are present and if not will install them.

You may need to clear your cache files to ensure that all URLs generated are fresh.

Click a few links and verify everything is functional. Test the add to cart and buy now buttons if you use them. Once you verify everything is working it's time to configure the contribution.

 

404 Error
This is the most common problem and is almost always due to having the path set incorrectly in the .htaccess file. To see if this is the problem, go to your site. If it has a url like http://some_domain.com/, then your shop is located in the root of your account. If it has a url like http://some_domain.com/another_name/, then your shop is located in the "another_name" sub-directory. Using this information, open your .htaccess file and find the line that reads

RewriteBase /

If your shop is located in the root directory, as determined with the above test, then the above line is correct. But if your shop is located in some other directory, then change the above line to

RewriteBase /another_name/


If the .htaccess file is setup correctly but the redirects still fail, or the session ID in the url does not go away, the problem is most likely due to an incorrectly setup configure file. Instructions for setting it up can be found in this thread.


***********************************************************************************************************

IMPORTANT: If your pages will not load, be sure to verify the above is correct. When you do post, please be sure to include the url to your shop and a copy of your .htaccess file if you are experiencing a page can't be found error.


STEP #8 - Configuration

You will find a new setting group in your admin control panel under Configuration => SEO URLs


OPTIONAL - Performance Monitoring and Assessment

In includes/application_bottom.php paste this code just after the opening PHP tag:

To activate the performance diagnostic code append ?profile=on to any URL which will save the setting to your session. Now you should see the performance profile data at the footer. You can browse the catalog and the output will be at the footer. This will allow you to quickly assess the performance of the homepage, category, and product pages. To turn it back off append ?profile=off to any URL.


This documentation was generated by phpDocumentor v1.3.0RC3