Community Add-Ons
Seach Engine Friendly URL
for osCommerce Online Merchant v2.2
This is my second attempt at creating a better version of the search engine safe urls.
It will change URLS from:
http://www.yoursite.com/product_info.php?cPath=1_4&products_id=1
to:
http://www.yoursite.com/Hardware/Graphics-Cards/Matrox-G200-MMS/
The support forum for this modifcation can be found here:
http://forums.oscommerce.com/index.php?showtopic=129041
Changes in .htacces
# SEF BEGIN
# Change ReWrite base according to where your store is located
# / is domain.com and /catalog is domain.com/catalog
RewriteEngine on
RewriteBase /catalog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ http://www.sitename.com/index.php?cPath=$1 [L]
# SEF END
This solves the problem
SEO Warning
This contribution allows all server errors(404 and others) to only return to the content of the homepage of your site and using the same url that the error happen on. In the sense of SEO this is very bad.
I have went into this contribution pretty deep and finally after days of trying to find a solution to it I have came a point where I know there isn't a solution.
Well, that is there isn't one for this contribution.
I just made a bad choice in assuming that the previous programmers knew better than to allow it to work this way.
What does this mean?
Well, I'll tell you...
Your index.php page will be used for every wrong url that is accessed by search engines
This wrong url is kept in the address bar and the content of index.php used
This means that you will have many many duplicate content pages.
This contribution takes a 404 return code and changes it into a 200 return code. Search engines will think that this no existent page is a good page.
A person could type anything they want to get your site and showing the front page
domain.com/porn
domain.com/porn.html
domain.com/anything_here/more_stuff
This contribution was a waste of my time to try to update and make work.
In the end is was very SEO unfriendly if a site owner has to deal with a duplicate content penalty.
A competitor could easily submit your site to directories with false title, description and place an obscene url with it that validates and have your site related to things that your site has nothing to do with.
I suggest you go with Ultimate SEO URLs at http://addons.oscommerce.com/info/2823
The download from member "FWR Media" works just fine with osCommerce 2.2RC2a.
It allows the errors that are supposed to happen naturally.
The developer made the scripting to work with the .htaccess file the way it should have been used.
Just a description edit from the last one.
Fixed and complete contribution
------------------------------------
Had some issues in the manufacturers file for info box.
Tested and working fine now
I also added 2 options for installing
1. All edited files are included for fresh install of osCommerce
2. Text instructions to add the code yourself
Had some issues in the manufacturers file for info box.
Tested and working fine now
Yet another fix.
I didn't save the index.php changes before uploading the last contribution.
Minor fluke
This is the full contribution again and works with "osCommerce Online Merchant v2.2 Release Candidate 2a"
* Fixed one line of code that was missing and leaving an error.
I added the index.php with all the changes already in it. so if you have a fresh install of oscommerce then you are able to skip the instructions in the READMEFIRST.txt for the index.php changes.
Just tried to make it a bit easier.
Someone wanted it to be in a zip file rather than a zipped up rar file. So here is the same contribution only zipped.
Be sure to unzip it correctly so the directory structure stays when unzipped.
I forgot to add the url_rewrite.php and it is now in the package.
This is the full contribution again and works with "osCommerce Online Merchant v2.2 Release Candidate 2a"
Re-adding my comments that were in my last upload
-------------------------------------------
This contribution is a combination of the following members listed contributions to make a full package.
Thanks to cbrugger, alextuturiga, RoboHost, and Foaly
I only added 2 files with this Contribution
1. meta_tags.php
2. url_rewrite.php
I only added what was needed. If you feel you need more then look in the contributions before this one.
A few notes(skip this if you aren't interested)
I started this with a stock install of "osCommerce Online Merchant v2.2 Release Candidate 2a" and then comparing all the files since the last FULL contribution.
I added all of the small sni[[et contributions after that which consisted of onlyu a newer version of url_rewrite.php.
I also downloaded and added the newest version of meta_tags.php. The one that was given in the last contribution was old and out of date.
The code offered below for catalog/index.php was combined with product_info.php by a previous contributor, I left it this way also.
Follow all the notes very carefully and you won't have any problems. I took the time to make note of every step and line of code.
Good luck in all you do,
Google Junky
This contribution is a combination of the following members listed contributions to make a full package.
Thanks to cbrugger, alextuturiga, RoboHost, and Foaly
I only added 2 files with this Contribution
1. meta_tags.php
2. url_rewrite.php
I only added what was needed. If you feel you need more then look in the contributions before this one.
A few notes(skip this if you aren't interested)
I started this with a stock install of "osCommerce Online Merchant v2.2 Release Candidate 2a" and then comparing all the files since the last FULL contribution.
I added all of the small sni[[et contributions after that which consisted of onlyu a newer version of url_rewrite.php.
I also downloaded and added the newest version of meta_tags.php. The one that was given in the last contribution was old and out of date.
The code offered below for catalog/index.php was combined with product_info.php by a previous contributor, I left it this way also.
Follow all the notes very carefully and you won't have any problems. I took the time to make note of every step and line of code.
Good luck in all you do,
Google Junky
This is a fix for non unique titles in same category.
it simply appends the products_id to the product title.
from (current release)
http://www.yoursite.com/Hardware/Graphics-Cards/Matrox-G200-MMS/
to
http://www.yoursite.com/Hardware/Graphics-Cards/Matrox-G200-MMS-454/
remove the .html extesion that cause some times bugs.
thanks to Augustin Vardianu
I have modify the "The doubled subcategories bug fixed" contribution to work with more than 2 categories level.
Am modificat "The doubled subcategories bug fixed" pentru a permite creearea a mai mult de 2 nivele a categoriilor.
Error in doubled subcategories for example:
Software -> Action
DVD Movies -> Action ... if user clicked
DVD Movies->Action the Catalog returns content of Software->Action subcategory. (Unreal Tournament)
The caching functionality is changed. Every file cached is enhanced for the parent category except the Categories with Parents = 0.
Before first usage, it is necessary to replace url_rewrite.php file and delete cache directory.
hier sind alle unten angegebenen updates enthalten. keine neuen änderungen!
The classes/url_rewrite.php file contained some errors. With .html extension modification.
This updated should solve them.
In order to display SEF URIs correctly all non ASCII chars have to be replaced by (more or less adequate) ASCII chars.
The prevoious version just stripped some chars instead of replacing them in an accurate way.
Be careful with your existing installation! BACKUP!
Enjoy!
JackStaffee
This Small fix will make possible to see in the shop the new categories that you added from the administration.
It is just an update at the includes/column_left.php
This Smal Fix It Will Help You To Have Html Extension
Credits
All credits goes to BlueYon , dynamoeffects, eww, hejian, GMTTDAN and to all who keep this contribution alive
This fix the error double slash in this page http://www.xxx.com/catalog/Hardware/
Here is a fixed fix.
This is a fix to the url rewrite file that is found in the class sub folder of the version 1.10
It fixes the double forward slash error in boxes.
You still need to download the latest release, this is just a single file fix.
* Clean index.php.
* add fix for useing Meta Tag Controller v1.2.
1. Added dynamoeffects's feature and security fix.
2. Added BlueYon's Manufacturers Box Update.
3. Clean the code and provide the catalog.diff file.
4. Other some minor changes.
IGNORE the previous file posted by me, I forgot to include part of an important instruction.
Download THIS file instead!!
This file is a fix for anyone wishing to use Header Tags Controller with BlueYon's Search Engine Friendly URL Contribution (I find HTC to be MUCH more complete and customizable than the Meta Tag Controller Support that was created for this SEO URL contribution.)
DO NOT INSTALL THIS PACKAGE IF YOU DO NOT CURRENTLY HAVE HEADER TAGS CONTROLLER AND META TAG CONTROLLER SUPPORT (by BlueYon) INSTALLED!!
(Install these two contributions first, then install this fix. Links to both required contributions is included in the install file.)
This file is a fix for anyone wishing to use Header Tags Controller with BlueYon's Search Engine Friendly URL Contribution (I find HTC to be MUCH more complete and customizable than the Meta Tag Controller Support that was created for this SEO URL contribution.)
DO NOT INSTALL THIS PACKAGE IF YOU DO NOT CURRENTLY HAVE HEADER TAGS CONTROLLER INSTALLED!!
(Install HTC first, then install this fix)
If cPath isn't in the URL, the category names won't be added to the modified URL. Links that looked like:
http://www.localhost.com/Speed/
now look like:
http://www.localhost.com/DVD-Movies/Action/Speed/
While doing that, I noticed that this script is vulnerable to mysql injection attacks where anyone can retrieve any information they want from your database, including customer information. I highly suggest you overwrite your old url_rewrite.php file with this one.
THIS IS JUST THE url_rewrite.php FILE. DOWNLOAD v1.8 BELOW AND USE THIS url_rewrite.php TO OVERWRITE THE OLD ONE.
This little update changes the manufacturers dropdown menu to match the rest of the SEO URL's.
Removed the feature to change the extention '/' to what ever trailing extention you want. This makes no difference to SEO at all and causes more problems in terms of coding and getting this contribution in to work with oscommerce.
Updated some more code everything should work now without a problem.
Bug fix for people who don't use the root of there site to run oscommerce.
Just over write the url_rewite.php in the classes directory.
You can install this if you run your site in the root or not.
I recommend installing this if you have just installed the latest version of this contribution.
Added exit error mesages to make sure people have set everything up correctly after installing.
Updated the code so it no uses less code on the out side of the rewrite.php script.
Fixed a bug that stopped the sorting of columns under the product listing.
Fixed a bug that caused errors to show when changing the language, currency or manufacturer.
Fixed the buy now button bug which did not take the customers to the shopping cart after clicking buy now.
Fixed a bug that took you to the product page after when clicking continue shopping after clicking on the buy now button.
Added a requested feature in the forums to change the extention '/' to what ever trailing extention you want.
Version 1.6
Improved caching to help with the speed and use less server resources.
Removed a lot of redundant code.
Updated the code to hopefully make it stable and more easy for people who are having problems installing.
Adapted the code so when osC-MS3 is finaly released I can change the script to work as a service module.
Fixed the problem with the popup image not working.
Fixed the URL's comming up with just as http.
Now uses hashing to get the get the product_id, manufacturer_id and categories_id.
I've rewritten the file url_rewrite.php, to get it work with the product model in stead of the product name.
It was needed in order to identify a product with the same name as an other one, but with different models/types.
The model/type has to be unique in order to make it all work properly (this also used to be the case with the product names in the original version)
This is already the case with the EasyPopulate contrib, so now they are compatible.
Hope you could use this addition and saves you some (editing/debugging) time and frustration out there.
Greetings,
J. Hollemans
White Rhino
http://www.white-rhino.nl/
I just add a line in url_rewrite.php in order to èéà and others become e, a which are used a lot in french.
Here is what you must put in french/index.php
define('TEXT_PRODUCT_NOT_FOUND', 'Aucun produit trouvé !');
define('TEXT_CURRENT_REVIEWS', 'Version actuelle :');
define('TEXT_MORE_INFORMATION', 'Pour plus d'informations, veuillez visiter <a href="%s" target="_blank"><u>cette page</u></a>.');
define('TEXT_DATE_ADDED', 'Ce produit a été ajouté au catalogue le %s.');
define('TEXT_DATE_AVAILABLE', '<font color="#ff0000">Ce produit sera en stock le %s.</font>');
define('TEXT_ALSO_PURCHASED_PRODUCTS', 'Les clients qui ont acheté ce produit ont aussi acheté :');
define('TEXT_PRODUCT_OPTIONS', 'Options disponibles :');
define('TEXT_CLICK_TO_ENLARGE', 'Cliquer pour agrandir');
-Added caching of the tables to improve the speed and use less server resources.
-Added '/' at the end of the url's like DMOZ.
-Improved the instruction
This is a complete package:
version 1.4:
- Added functionality to let it work with lower-case urls AND uppercase
- fixed a bug when shop wasn't in the root
Support thread:
http://forums.oscommerce.com/index.php?showtopic=129041
This update fixes the problem that some search engines were indexing url's with lower-cases only.
When clicked on such a link the page got redirected to the main index.php.
Just replace /includes/classes/url_rewrite.php
with the file in this .zip
Have fun
This is a combination of the latest updates. It includes RikP manufacturers box!
Ok this seems to fix alot of problems!
Just replace the file url_rewrite.php in includes/classes/ with this one!
Please bug report to:
http://forums.oscommerce.com/index.php?showtopic=129041
that should be the dropdownlist of the manufacturers...
sorry for the typo ;-)
This is an addon which will make the dropdownlist of the administrators point to the Search Engine Friendly URL.
To see it in action goto www.bioxs.nl
This attempt at changing the URLs is untested and my still have bugs. Use at your own risk!
This seems to work for me , but still has one small bug when clicking the continue shopping button on the shopping cart page.
Hopefully will I will be able to get this working 100% soon.
Sorry small mistakes in the install.txt
Need to move some code to get this to work!
This should solve some peoples problems they have had with the urls being rewriten.
This is my second attempt at creating a better version of the search engine safe urls.
It will change URLS from:
http://www.yoursite.com/product_info.php?cPath=1_4&products_id=1
to:
http://www.yoursite.com/Hardware/Graphics-Cards/Matrox-G200-MMS/
You can see it being used on a live site here:
http://www.itchi-tech.com
The support forum for this modifcation can be found here:
http://forums.oscommerce.com/index.php?showtopic=129041
