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
osCommerce , CRE Loaded , Zen Cart , or any other osC based solution
>= PHP 4.3.0
Linux based server capable of mod_rewrite
...5 mintues to install the contribution
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
The class file seo.class.php should be uploaded to includes/classes/ seo.class.php
The update file reset_seo_cache.php should be uploaded to admin/includes/ reset_seo_cache.php
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
Enable SEO URLs?
Default Setting: true
This setting enables/disables the SEO URLs contribution globally.
Add cPath to product URLs? *NEW*
Default Setting: false
This setting enables/disables the option of adding the cPath ID parameter to the end of product pages.
Example: some-product-p-1.html?cPath=xx
Add cPath to product URLs?
Default Setting: false
This setting enables/disables the option of adding the cPath Name parameter before the product name.
Example: some-category-some-product-p-1.html
Add category parent to begining of URLs?
Default Setting: true
This setting enables/disables the option of adding the category parent to the beginning of category URLs.
Example: parent-category-some-sub-category-c-1.html
Choose URL Rewrite Type
Default Setting: Rewrite
This setting selection of URL rewrite types. Currently, there is only the 1 type (Rewrite) but in the future there will be more.
Filter Short Words
Default Setting: true
This setting allows a store owner to filter short words which typically add no value. Don't set this too high!
Output W3C valid URLs (parameter string)?
Default Setting: true
This setting allows a store owner to choose W3C valid URLs.
Enable SEO cache to save queries?
Default Setting: true
This setting enables/disables the query cache engine globally. If disabled each URL generated will take 1 query.
Enable product cache?
Default Setting: true
This setting enables/disables the option of using cache for the products.
Enable categories cache?
Default Setting: true
This setting enables/disables the option of using cache for the categories.
Enable manufacturers cache?
Default Setting: true
This setting enables/disables the option of using cache for the manufacturers.
Enable All Products SEO cache?
Default Setting: false
This setting enables/disables the option of using cache for All Products SEO (if installed).
Enable Articles Manager Articles cache?
Default Setting: false
This setting enables/disables the option of using cache for the Articles Manager articles (if installed).
Enable Articles Manager Topics cache?
Default Setting: false
This setting enables/disables the option of using cache for the Article Manager topics (if installed).
Enable FAQDesk cache?
Default Setting: false
This setting enables/disables the option of using cache for the FAQDesk (if installed).
Enable Information Manager cache?
Default Setting: false
This setting enables/disables the option of using cache for the Information Manager (if installed).
Enable Links Manager cache?
Default Setting: false
This setting enables/disables the option of using cache for Links Manager II (if installed).
Enable NewsDesk Articles cache?
Default Setting: false
This setting enables/disables the option of using cache for NewsDesk Articles (if installed).
Enable NewsDesk Categories cache?
Default Setting: false
This setting enables/disables the option of using cache for NewsDesk Categories (if installed).
Enable PollBooth cache?
Default Setting: false
This setting enables/disables the option of using cache for PllBooth (if installed).
Enable Page Editor cache?
Default Setting: false
This setting enables/disables the option of using cache for Page Editor (if installed).
Enable automatic redirects?
Default Setting: true
This setting enables/disables the automatic 301 header redirect logic. This sends a moved permanent header for all old URLs to the new ones. This setting is highly recommended for stores that have already been indexed by spiders.
Enable use Header Tags as name?
Default Setting: false
This setting enables/disables using the title as declared in Header Tags in the url. Please note that Header Tags must be installed and functioning correctly for all pages. Also, since enabling this option will affect the url, doing that can cause a loss of index position. However, 301's will be issued so the loss should be temporary.
Enable performance checker?
Default Setting: false
This setting enables/disables the performance checking code in this contribution. When on, it will keep track of the number of database calls made. There will be a slight slow down when this option is enabled and it doesn't server a purpose for normal operation so it should be off on a live shop.
Enter special character conversions
Default Setting: NULL
This setting allows a store owner to enter a list of special character conversions. Please note the format below.
FORMAT : char=>conv, char2=>conv2, char3=>conv3
NOTE: use a comma as the separator
Remove all non-alphanumeric characters?
Default Setting: false
This setting allows the store owner to remove all non-alphanumeric characters from the URL. This is highly effective and will result in some interesting URLs. For example, some-product-p-1.html will become someproduct-p-1.html
Reset SEO URLs Cache
Default Setting: false
This setting allows the store owner to clear the SEO cache manually.
Uninstall Ultimate SEO
Default Setting: false
This setting allows the store owner to remove the settings completely so they can be easily re-added (just click on a link in the shop to do that).
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