User Friendly URL rewritter 
 
 This contribution is based on Ultimate SEO URLS 5 Pro by Jack_mcs.
 
 It rewrites the standard Phoenix URLs to make them more user friendy. It also adds the ability to diferentiate URLs by language, creating different URL addresses for each one. It includes a header tag module that adds hreflang tags to the pages. This highly improves Phoenix SEO capabilities for multi-lingual shops, i.e.:
 
 - Default language (English): www.mysite.com/green-tomatoes-p-6.html
 - Second language (Spanish): www.mysite.com/es/tomates-verdes-p-6.html
 - Third language (French): www.mysite.com/fr/tomates-vertes-p-6.html
 
 Default language will not include the language path (/en/, /es/, /fr/, /de/...)
  
 UFR also has the ability to cache URLs, using two methods: File or Mysql based.
 
 Included in this package is a sitemap generator compatible with multiple languages.

Installation:

Copy the files inside /catalog/ directory to the rooot of your site. Enter your site once to install the database tables and access the admin to configure the app to fit your needs. There are no core code changes.

Htaccess file:

Setup will try to add the following to the .htacces file on the root of your site:

## BEGIN USU URL rewrite rules ##
## USU Version: 3.0.1 ##
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /CE-Phoenix-1.0.7.10a/
  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/-]+)-p-([0-9]+).html$ product_info.php [NC,L,QSA]
  RewriteRule ^([a-z0-9/-]+)-pi-([0-9]+).html$ info.php [NC,L,QSA]
  RewriteRule ^([a-z0-9/-]+)-pr-([0-9]+).html$ ext/modules/content/reviews/write.php [NC,L,QSA]
</IfModule>
## END USU URL rewrite rules ##

Succes will depend on your server's setup. If this can't be automatically done you'll have to manually modify this file to add the previous block.

Based on how you access your web shop modify RewriteBase as follows: -
    I access my site as www.mysite.com/ - RewriteBase /
    I access my site as www.mysite.com/catalog/ - RewriteBase /catalog/
    I access my site as www.mysite.com/catalog/shop/ - RewriteBase /catalog/shop/



A note on *nix server settings for RewriteRules

mod_rewrite must be compiled in apache and AllowOverride set to ALL in httpd.conf ( usually this is already in place )

Windows IIS servers only

If you want to use ReWriteRules you have to have either ISAPI rewrite or IIS rewrite installed on the server, you will also have to have the .htaccess rules converted

Some servers don't allow path based querystrings:

If with the standard and path standard uris you get page not found this probably means that your server does not allow path based querystrings. In such cases you will need to use the rewrite uri types.
To test if your server has this issue try accessing your web shop like www.mysite.com/index.php/test/ if it fails to load the page then you have this problem. 


Settings:

    Enable SEO URLs
        Effectively an on/off switch .. true being on .. false off
    Enable the cache
        Effectively an on/off switch for the caching system .. true being on .. false off
    Enable multi language support
        Turn on/off the multi language functionality .. true being on .. false off
    Output W3C valid URIs
        Output W3C valid links that won't break your validation
    Select your chosen cache system
        File:
        Stores the cache as a text file. No queries are used after the cache is fully loaded.
        MySQL:
        Stores the cache in the database.
    Set the number of days to store the cache
        How many days a cache will be kept before auto deleting itself.
    Choose the URI format
        There are 4 options

        The difference between the four is shown below: -
            Standard Seo Urls ( does not require mod_rewrite )
                www.mysite.com/product_info.php/the-brand-etc-great-product-p-3
            Path Standard Seo Urls ( does not require mod_rewrite )
                www.mysite.com/product_info.php/the-brand-etc/great-product-p-3
            Traditional Rewrite Seo Urls ( Requires mod_rewrite and RewriteRules added to .htaccess )
                www.mysite.com/the-brand-etc-great-product-p-3.html
            Path Rewrite Seo Urls ( Requires mod_rewrite and RewriteRules added to .htaccess )
                www.mysite.com/the-brand-etc/great-product-p-3.html
    Choose how your product link text is made up
    
        URLs can be composed with any combination of product, category, manufacturer or model names in any order. It can be changed and the old URL will redirect to the new one.    
    
        There are 49 different ways to write your products link text. Any combination of the below ( e.g. bp produces brand-product name or brand/product name if the uri type is path based )
            p = products name
            c = category name
            b = manufacturer name ( b for brand )
            m = model
        cbmp produces category-brand-product-name-model or category/brand/model/product-name if the uri type is path based:
    www.mysite.com/en/vegetables-von-peacock-green-tomatoes-gtom-p-6.html

    Filter Short Words
        When creating a link from a product name you may want to remove the shorter words .. like a | or | at | the .. etc.
        Default value is 1 but you can choose to filter short words of 1 2 or 3 letters.
        A setting of 3 would filter out all words of three letters or less.
    Add category parent to the beginning of the url
        Enables/disables the option of adding the category parent to the beginning of category URLs.
    Remove all non-alphanumeric characters
        Removes all non alphanumeric characters .. this is best left as true.
        If your language uses special characters you will need to use the conversion system see extras/character_conversion_pack/instructions.txt
    Add cPath to product URLs
        Adds ?cPath=x to the end of product urls .. not sure why ( perhaps menu highlighting ) but retained for backwards compatibility.
    Turn performance reporting on/off .. true being on .. false off
        Shows USU5 performance at the bottom of your web shop.
    Turn variable reporting on/off .. true being on .. false off
        Shows USU5 class properties at the bottom of your web shop. Great for debugging.
    Force www.mysite.com/ when www.mysite.com/index.php
        Redirects index.php to your base domain. Beware! on some servers this creates a redirect loop so turn it on .. try it .. if it creates a loop turn it OFF.
    Reset SEO URLs Cache
        Clicking on "reset" will empty the cache.


3) Multilanguage support

You have the ability to add individual character conversion files to the following directory:
    catalog/includes/apps/ultimate_seo_urls5/includes/character_conversion/

The files must be named exactly the same as your language file in catalog/includes/languages/ - e.g. danish.php or german.php or espanol.php etc.

For most of these files I have tried to put the special characters in the array but it is up to you to add the English equivalents.

New language box and navbar modules, hreflang and canonical tags:

IMPORTANT!!! If you enable multilanguage support for this contribution you have to use the multilanguage box and/or navbar modules instead of the stock oscommerce ones (that must be disabled). You can locate the modules on the addittional_uploads directory of this package.  


Changelog:

1.0.0 Initial release (XX/XX/XXXX)

