Search engine friendly URLs with PHP session killer and Meta tags Mod for CubeCart 3 Otherwise known as the SEO mod... Version 6.2 Author: Joseph Rukshan Fonseka Email: rukshanf@optushome.com.au Mod website: http://www.intimatewear.com.au/cc3_mods/ Do not forget to list your shop in http://www.buysearcher.com/ the online shopping directory! This is a mod for cubecart 3.0.17 and newer BACK UP!!!! BACK UP!!!! License --------------------------------------------------------- You may use this mod on your cube cart without purchasing a license if you leave the advertisement link on the footer intact. Removing the link will violate the license. If you wish for the link to be removed you must purchase a license. The license purchased is for cube cart(s) running on a SINGLE domain name. NOTE!! Using this mod unlicensed will add a link to the footer which will toggle between the search engine friendly website and the buy search shopping directory. You may NOT remove this link unless you have bought a license for the domain name that hosts your cube cart store. NOTE!! This license for the mod is in NO WAY affliated with cube cart or Devellion Ltd at all!!! I suggest you download the mod and install it and only if you are happy with the results and wish to remove the search engine friendly link at the footer then consider purchasing a license for the mod! To obtain a license go to http://www.intimatewear.com.au/cc3_mods/ Purchasing a license will remove the search engine friendly link in the footer. Installation service is also provided through that link. NOTE!! Please install the mod first to make sure it is working and you are happy with it BEFORE you decide to buy a license. Licenses are NON refundable!!! NOTE!! If you have previously bought a license and upgraded to a later version of the mod, you must get it reissued DO NOT reuse your old licensed file it will be buggy!! Please visit the above website to get it reissued. Requirements --------------------------------------------------------- Apache is no longer a requirement. However, if you are using the PHP generated configuration you must have FTP access to your account. Features --------------------------------------------------------- * URLS in cube cart are easy for humans to read * URLS in cube cart are easy for search engine to spider * PHP sessions are killed if the user agent is identified as a search engine * Large list of known spiders. Taken from the OsCommerce project * Boxes such as shopping cart and sessions are hidden if the user agent is identified as a search engine These links have redir parameters tagged to the URLs which can exhaust a spider because of the infinite amount of links its creates. As of version 2.0 * Product and category names appear within the URL * Will strip dangerous characters from the product/category when generating the url * Does not require the RewriteRule for this mod to work * Cube cart can be in a folder other than the root directory, no special mods required for this. As of version 3.0 * Fixed bug with currency and language dropdown boxes * Fixed bug with search * Fixed bug with print form * Fixed bug with more images * Fixed other miscellaneous bugs * Added admin on/off search engine friendly url switch * Displays category names within the title bar just like the products. As of version 3.1 * Fixed bug where if a product had options, the buy button from within a category jumped to the homepage * Added switch to admin so user can now specify whether their server supports .htaccess files and the ForceType keyword. * Merged up mod to cube cart 3.0.2 files. As of version 3.2 * Fixed minor bug but huge impact. Paypal gateway wasn't working. AND possibly other gateways! As of version 4.0 * accented latin characters are now normalized within the url. * meta titles, descriptions and keywords can be customized for each sitedoc, product and category * product names and category structures now appear within the page titles * much better server support with the reintroduction of the RewriteRule rule * Fixed numerous other minor bugs As of version 4.1 * Page titles are displayed in the current language selected by the user, for search engines it will always be the default language. * Merged up mod to cube cart 3.0.3 files. As of version 4.2 * Fixed buy button bug, now only hypher links will be made search engine friendly * Added feature to select between "cat->sub cat->prod name" AND "prod name->sub cat->cat" in page titles * Added feature to override global meta tags with the sef meta tags if they are not empty * Added robots.txt * Updated spider.txt, now contains a huge list of major/minor/regional search engines. * Merged up mod to cube cart 3.0.5 files. As of version 4.3 * Merged up mod to cube cart 3.0.6 files. As of version 5.0 * Froogle now creates SEF urls * Added new configuration 'PHP generated pages', this should allow this mod to run on any server. * Merged up mod to cube cart 3.0.7-pl1 files. As of version 5.1 * If sitedoc doesn't have a title mod will still work * Merged up mod to cube cart 3.0.8 files. As of version 5.2 * Modified to work better with other mods if extra query parameters are added to urls * Merged up mod to cube cart 3.0.9 files. As of version 5.3 * Check if PHP_SELF includes full directory of shop.php, if not insert it. Used by lookback only configuration (untested) * Remove SEO link that appears in the more images popup. Its not visible but its there. * Create option of passive mode for FTP (untested). * Merged up mod to cube cart 3.0.10 files. As of version 5.4 * Merged up mod to cube cart 3.0.11 files. As of version 5.5 * Merged up mod to cube cart 3.0.12 files. As of version 5.6 * Merged up mod to cube cart 3.0.13 files. As of version 5.7 * Don't rewrite urls if in the secure part of the cart, solves issues with shared SSL. * Merged up mod to cube cart 3.0.14 files. As of version 6.0 * Copyright link (unlicensed seo mod) will now toggle between promoting the SEO website and the Buy Searcher online shopping directory. * Option to override the meta title for sitedocs, categories and products. * Option to use your own keywords within the URLs using the custom URL feature. * Merged up mod to cube cart 3.0.15 files. As of version 6.1 * Copyright link (unlicensed seo mod) will now advertise some websites. * Fixed buy button not working in some servers when using lookback or php generated server configurations. * Fixed google base product links when using lookback server configurations. * Merged up mod to cube cart 3.0.16 files. As of version 6.2 * Merged up mod to cube cart 3.0.17 files. Instructions --------------------------------------------------------- 1) Back up your cube cart before doing anything! 2) If you have a fresh install of cube cart version 3.0.17 then simply overwrite the files in your cube cart with the files in the zip file. NOTE! Make sure your cube cart is installed correctly and working before you apply this mod! * If you have made ANY mods to your cube cart or your cube cart is NOT version 3.0.17 then I suggest you use WinMerge and merge the search engine mods to your cube cart files. All changes are clearly marked with a comment to make it easy to identify what to merge. PLEASE NOTE!! If you have previously installed an older version of this MOD, then I suggest you undo all changes before applying this MOD. Easiest way is to do a diff between your cubecart and the original version of your cubecart and revert back all search engine friendly mods. If you do not know how to use winmerge or merge software DO NOT even attempt to install this on your modded cubecart. Get someone to do it for you! I cannot provide any support if you decide to install the mod yourself. If you need installation then please see http://www.intimatewear.com.au/cc3_mods/. 3) After moding your cube cart. Go to Store config -> General Settings in your admin panel. Scroll down and select YES for 'use search engine friendly URL' and click on the 'update settings' button. This will enable the server configuration setting in the admin panel. 4) Now you must select a server configuration to use from the admin panel, if you are NOT using Apache, skip to next step. Note: If you get server internal errors and cannot access any part of your website, then please delete the .htaccess file from the cube cart root directory. This should clear up the error and give you access to your website. Without the .htaccess file you will be limited to 'lookback supported only' and 'PHP generated pages' server configurations. Select a server configuration, I suggest trying them in the order of: a) Apache RewriteRule supported b) Apache directory 'lookback' and ForceType supported c) Apache directory 'lookback' supported only Select a server configuration and click on the 'update settings' button. Now go to your store and browse through it, if you can view your products then the server configuration you selected is valid for your server. If you have gone through the whole list and still cannot browse through your store then try following steps. i) Select 'Apache RewriteRule supported' then edit the ORGINAL .htaccess file in the root directory OF YOUR SHOP and delete everything inbetween '# 1)' and '# end 1)'. Now try browsing your store. ii) If that did not work then select 'Apache directory 'lookback' and ForceType supported' then edit the ORGINAL .htaccess file in the root directory OF YOUR SHOP and delete everything inbetween '# 2)' and '# end 2)'. Now try browsing your store. iii) If that did not work then select 'Apache directory 'lookback' supported only' then delete the .htaccess file in the root directory OF YOUR SHOP. If your server allows .htaccess files then you don't need to delete it instead edit the file and delete everything inbetween '# search engine friendly mod' and '# end mod'. Now trying browsing your store. iv) Lastly if none of these work for you, try PHP generated pages, see next step. 5) If you are NOT using Apache or could not get any of the above server settings to work. Then try PHP generated pages. a) Update the file in admin/settings/sef_genpages.php with your FTP settings. Enter you FTP server, username and password. For $ftp_cube_cart_root_dir I suggest you start up your favourite FTP program and keep track of what directories you have to go through until you get to your cube cart root folder (where spiders.txt lives). i.e if you had to click on home then public_html then you will enter "home/public_html/". Note the trailing slash, and no slash in the front! b) Save file and upload replacing the old file. c) Select PHP generated pages from the server configuration dropdown box and click on 'update settings' button. d) Now click on the generate link that appears. Please be patient it can take minutes to process. A final page with all the results will be displayed. e) Now trying browsing the store, hopefully all is ok. NOTE: Using this configuration, Whenever you add new products, categories or documents OR modify any of their titles YOU MUST generate the pages again. If not you will get 404 errors for the new items and your titles will not be in sync! NOTE: This configuration creates directories and files on your account using your FTP settings you provided! 7) If none of the configurations work, then unfortunately you cannot use search engine friendly urls on your store. So please select NO to 'use search engine friendly URL'. You can contact your webhost admin and check with them if you can use the RewriteRule OR AcceptPathInfo (turns on Apache's directory 'lookback' feature). You do not need to turn on search engine friendly URLs to use the sef meta tags however. 8) If you have search engine friendly urls working then download Xenu Link from http://home.snafu.de/tilman/xenulink.html, use this to check your cube cart. Point to the homepage. There should be a finite amount of pages crawled and hopefully no URLs with question marks in them. If you get a finite amount of pages and all links are Ok, congratulations your cube cart is search engine friendly! 9) If you wish to use the sef meta tags then click on the install link in the admin panel to extend your database tables. Then you can select 'Combine with global meta tags' to use the feature. Behaviour of sef meta tags can be: Disable feature -> don't use sef meta tags Combine with global meta tags -> sef meta tags will inserted in front of the global meta tags Override global meta tags -> if the sef meta tags are not empty they will be used in place of the global meta tags Problems --------------------------------------------------------------- 1) If you can't get this mod working on your shop. I suggest to install a test cart that is a clean fresh install of cube cart 3.0.17 then apply this mod. If that works perphaps the merge to your cube cart might not have been 100% correct. 2) If you notice something odd/bug about your cube cart's behaviour. Turn off search engine friendly URLs from the admin panel and try again. If it happens still it will most likely be a cube cart bug. 3) If you think it is a genuine search engine friendly mod bug, please test it on my test cart http://www.intimatewear.com.au/testcart if it happens there too, email me the details of the bug. Disclaimer --------------------------------------------------------- BACK UP your cube cart files and database and try the mod first on a non active cube cart. I am not responsible for any loss of data or any thing else for that matter. It is your choice to add this mod to your cube cart and you do so at your own risk.