♥FWR Media Posted May 8, 2011 Author Share Posted May 8, 2011 (edited) Is there a way to have url with underscores (www.estore.com/my_product-p-57.html) redirected to www.estore.com/my-product-p-57.html My old urls have underscores (_) and I didn't find out how to fix that. So if a visitor comes from one of the old urls, there is a 404 not found page. Thank you for your help. Probably the easiest way is to modify the .htaccess regular expression so that the product name string is captured and therefore redirected with the correct params .. try ,, RewriteRule ^([a-z0-9_/-]+)-p-([0-9]+).html$ product_info.php [NC,L,QSA] Which replaces: - RewriteRule ^([a-z0-9/-]+)-p-([0-9]+).html$ product_info.php [NC,L,QSA] Edited May 8, 2011 by FWR Media Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
mujina Posted May 8, 2011 Share Posted May 8, 2011 Probably the easiest way is to modify the .htaccess regular expression so that the product name string is captured and therefore redirected with the correct params .. try ,, RewriteRule ^([a-z0-9_/-]+)-p-([0-9]+).html$ product_info.php [NC,L,QSA] Which replaces: - RewriteRule ^([a-z0-9/-]+)-p-([0-9]+).html$ product_info.php [NC,L,QSA] It works! thank you very much for your help and for your precious work on this contribution. Quote OSC2.2 Link to comment Share on other sites More sharing options...
mujina Posted May 9, 2011 Share Posted May 9, 2011 (edited) Hi again, Is there a way to generate a seod url from the admin. I installed a product notification in categories.php The email is sent to the customer with the basic url : product_info.php?products_id=298, I would like the mail to be sent with the rewrited url : my-product-p-298.html I tried to create the function tep_href_link_seod in categories.php : ##################################### require_once('../includes/configure.php'); require_once('../includes/filenames.php'); require_once('../includes/database_tables.php'); //// // Ultimate SEO URLs v2.1 // The HTML href link wrapper function /** * ULTIMATE Seo Urls 5 PRO by FWR Media * Replacement for osCommerce href link wrapper function */ include_once('../'.DIR_WS_MODULES.'ultimate_seo_urls5/main/usu5.php'); function tep_href_link_seod( $page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true ) { return Usu_Main::i()->hrefLink( $page, $parameters, $connection, $add_session_id, $search_engine_safe ); } ########################################### I thought it would work, the path is right but the page displays the following error : Warning: require_once(includes/modules/ultimate_seo_urls5/includes/usu_general_functions.php) [function.require-once]: failed to open stream: No such file or directory in /xxx/includes/modules/ultimate_seo_urls5/main/usu5.php on line 22 Maybe it is possible to create and add such a function in admin/includes/functions/htmloutput.php file so that we be able to call this function wherever we want to from the admin? Thank you in advance. Edited May 9, 2011 by mujina Quote OSC2.2 Link to comment Share on other sites More sharing options...
Juto Posted May 9, 2011 Share Posted May 9, 2011 Hi Robert. I have tried for ages now to get USU5 to work with UTF-8, but no success. So, how do I do it? Many thanks Sara Quote Contributions: http://addons.oscommerce.com/info/8010 http://addons.oscommerce.com/info/8204 http://addons.oscommerce.com/info/8681 Link to comment Share on other sites More sharing options...
♥FWR Media Posted May 9, 2011 Author Share Posted May 9, 2011 Hi Robert. I have tried for ages now to get USU5 to work with UTF-8, but no success. So, how do I do it? Many thanks Sara Trying to get what to work? I haven't a clue what you mean, I'm not aware of anything that "doesn't work". Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
Heat33 Posted May 9, 2011 Share Posted May 9, 2011 Hi, I installed the 2.3 version, have changed all the files, 777 the 2 folders that was needed to be 777 and I can not see anything in the admin panel to enable this. Where is it? AM I blind? Quote Link to comment Share on other sites More sharing options...
Heat33 Posted May 9, 2011 Share Posted May 9, 2011 Forget my last post, it just all of a sudden just started working :) Quote Link to comment Share on other sites More sharing options...
Heat33 Posted May 9, 2011 Share Posted May 9, 2011 Actually a slight problem, I get this for the cart optin at the top. HEADER_TITLE_CART_CONTENTS HEADER_TITLE_CHECKOUT HEADER_TITLE_MY_ACCOUNT Quote Link to comment Share on other sites More sharing options...
pdcelec Posted May 9, 2011 Share Posted May 9, 2011 (edited) Forget my last post, it just all of a sudden just started working :) Robert's contributions are good but NOT magical. Things dont "all of a sudden" do anything. It was something that YOU did!!!! Edited May 9, 2011 by pdcelec Quote Link to comment Share on other sites More sharing options...
pdcelec Posted May 9, 2011 Share Posted May 9, 2011 Actually a slight problem, I get this for the cart optin at the top. HEADER_TITLE_CART_CONTENTS HEADER_TITLE_CHECKOUT HEADER_TITLE_MY_ACCOUNT This has nothing at all to do with USU5 Quote Link to comment Share on other sites More sharing options...
Heat33 Posted May 9, 2011 Share Posted May 9, 2011 Well it must of happen with the edits. I will go recheck it a little later. Quote Link to comment Share on other sites More sharing options...
Crusher79 Posted May 11, 2011 Share Posted May 11, 2011 Hi, i am gettings this error: SEO URLs 1146 - Table 'oscommerce.cache' doesn't exist DELETE FROM cache WHERE cache_name LIKE '%seo_urls%' I read the installation guide a few times. But i can't solve the problem. I am using the latest 2.x version of osc. However, URL Rewrite works fine. But i can't add any new item, etc. cause i am getting this error when adding article or pointing to "SEO urls" in configuration modul. greetz Crusher Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted May 11, 2011 Author Share Posted May 11, 2011 Hi, i am gettings this error: SEO URLs 1146 - Table 'oscommerce.cache' doesn't exist DELETE FROM cache WHERE cache_name LIKE '%seo_urls%' I read the installation guide a few times. But i can't solve the problem. I am using the latest 2.x version of osc. However, URL Rewrite works fine. But i can't add any new item, etc. cause i am getting this error when adding article or pointing to "SEO urls" in configuration modul. greetz Crusher This error is nothing to do with USU5. It relates to Chemos old SEO URLS so some old code remains in your admin files. Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
Crusher79 Posted May 11, 2011 Share Posted May 11, 2011 This error is nothing to do with USU5. It relates to Chemos old SEO URLS so some old code remains in your admin files. Thx for your quick reply. Well i just used google and found this thread and your post 2 years ago. Your old answer So i thought, this was the correct thread. I am a little bit confused now. Ok i installed "Ultimate_SEO_URLSv22d_11". I searched only for seo, etc. I think rollback all changes. Well is "Ultimate_SEO_URLSv22d_11" obsolete? Quote Link to comment Share on other sites More sharing options...
ms35d4 Posted May 11, 2011 Share Posted May 11, 2011 Hello Sorry to ask this question here again, I did create a new post long time ago but nobody has replied, I since put another one within this section or post but still not resolved. I apologise in advance if what I am asking is basic or something that is obvious i'm not programmer / coder and I am installing as per instructions these great add ons kindly uploaded, althought they have been installed. My question is basically how can I get some charachters which are removed in the header and meta titles, I have many products with manufacturer part numbers which have these charachters exampl: - + / here is an example of product from site TS-412U+/4TB I have installed SEO add on: KissMT_1.0_r72_RC Sitemap add on: usu5 XML Site Maps Ultimate_Seo_Urls_5_PRO_r205 Please can someone help me or let me know where I need to look, or what I need to do to sort this out. Kind Regards Quote Link to comment Share on other sites More sharing options...
roadkill Posted May 11, 2011 Share Posted May 11, 2011 (edited) Thank you for this awesome contribution! I use Chemo's SEO URL's on another server and have installed Ultima SEO Urls 5 on a yet-to-be-launched-store Currently with the standard rewrite but possibly I will instal a mod_rewrite api on my iis I need a little support with the following: The complete contribution is installed and seems to work like a charm.... ...except When I call the store URL at www.mystore.com I get Fatal error: Call to a member function retrieveDependencies() on a non-object in ***\MYSTORE.COM\***\includes\modules\ultimate_seo_urls5\uri_modules\osc_experimental.php on line 51 on www.mystore.com/index.php everything works fine. I searched this forum/google/etc to find a solution and have tried to bypass $dependencies = Usu_Main::i()->getVar( 'page_modules', substr( Usu_Main::i()->getVar( 'filename' ), 0, -4 ) )->retrieveDependencies(); but it resulted in comparable errors in other files in the folder uri_modules If someone could help me on this I would be very grateful :) Edited May 11, 2011 by roadkill Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted May 11, 2011 Author Share Posted May 11, 2011 (edited) Thank you for this awesome contribution! I use Chemo's SEO URL's on another server and have installed Ultima SEO Urls 5 on a yet-to-be-launched-store Currently with the standard rewrite but possibly I will instal a mod_rewrite api on my iis I need a little support with the following: The complete contribution is installed and seems to work like a charm.... ...except When I call the store URL at www.mystore.com I get on www.mystore.com/index.php everything works fine. I searched this forum/google/etc to find a solution and have tried to bypass $dependencies = Usu_Main::i()->getVar( 'page_modules', substr( Usu_Main::i()->getVar( 'filename' ), 0, -4 ) )->retrieveDependencies(); but it resulted in comparable errors in other files in the folder uri_modules If someone could help me on this I would be very grateful :) Could you please turn on variable reporting then go to the bottom of your site and copy the output then PM it to me. Ensure you are accessing the site as the root domain as per the problem. WARNING this appears at the bottom of your website so only turn this on momentarily then turn it straight back off. Also please confirm that you are using the latest uploaded version. Edited May 11, 2011 by FWR Media Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
roadkill Posted May 11, 2011 Share Posted May 11, 2011 (edited) Could you please turn on variable reporting then go to the bottom of your site and copy the output then PM it to me. Ensure you are accessing the site as the root domain as per the problem. WARNING this appears at the bottom of your website so only turn this on momentarily then turn it straight back off. Also please confirm that you are using the latest uploaded version. Hi and thanks for this swift reply :) I PM-ed the result of the variable report. The report could only be pulled of /index.php the root / just gives the fatal error. I am using the most recent version of SEO urls 5 b.t.w. I did install contrib: multi-stores(database stored config) en SEO header tags and some minor other contribs Edited May 11, 2011 by roadkill Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted May 11, 2011 Author Share Posted May 11, 2011 Hi and thanks for this swift reply :) I PM-ed the result of the variable report. The report could only be pulled of /index.php the root / just gives the fatal error. I am using the most recent version of SEO urls 5 Then you have sent me debug data for a page that works .. not a lot of use that :) Could you pm me the top 9 lines of catalog/includes/configure.php please. define('HTTP_SERVER', 'http://www.mysite.com'); define('HTTPS_SERVER', 'http://www.mysite.com'); define('ENABLE_SSL', false); define('HTTP_COOKIE_DOMAIN', ''); define('HTTPS_COOKIE_DOMAIN', ''); define('HTTP_COOKIE_PATH', '/oscommerce/2.3.1/'); define('HTTPS_COOKIE_PATH', '/oscommerce/2.3.1/'); define('DIR_WS_HTTP_CATALOG', '/oscommerce/2.3.1/'); define('DIR_WS_HTTPS_CATALOG', '/oscommerce/2.3.1/'); Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
♥FWR Media Posted May 11, 2011 Author Share Posted May 11, 2011 I haven't a clue about any "multi store contribution" I just need the relevant data to see why it is causing a problem. Please do this: - Open up catalog/includes/modules/ultimate_seo_urls5/uri_modules/osc_experimental.php Find ( line 49 ) public function isValidUri() { Change TEMPORARILY to: - public function isValidUri() { // REMOVE ME if ( array_key_exists( 'fwrtest', $_GET ) ) { die( '<pre>' . print_r( array( DIR_WS_CATALOG, Usu_Main::i()->getVar( 'filename' ) ), true ) . '</pre>' ); } // END REMOVE ME Then access your site like www.mysite.com/?fwrtest and post the results here Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
Juto Posted May 11, 2011 Share Posted May 11, 2011 Trying to get what to work? I haven't a clue what you mean, I'm not aware of anything that "doesn't work". :) I am the one that doesn't work :) I had forgotten to change the encoding to utf-8 for the character conversions. Silly me as usual! Sara Quote Contributions: http://addons.oscommerce.com/info/8010 http://addons.oscommerce.com/info/8204 http://addons.oscommerce.com/info/8681 Link to comment Share on other sites More sharing options...
Juto Posted May 11, 2011 Share Posted May 11, 2011 Hi again Robert ... :) This I would like to have a fix for: Error Type: [E_NOTICE] Undefined offset: 3 On line 84, 86 & 87 File includes/modules/ultimate_seo_urls5/uri_modules/osc_experimental.php Since I am near to a "perfect site" ... Many, many thanks to you! Sara Quote Contributions: http://addons.oscommerce.com/info/8010 http://addons.oscommerce.com/info/8204 http://addons.oscommerce.com/info/8681 Link to comment Share on other sites More sharing options...
roadkill Posted May 11, 2011 Share Posted May 11, 2011 (edited) I haven't a clue about any "multi store contribution" I just need the relevant data to see why it is causing a problem. Please do this: - Open up catalog/includes/modules/ultimate_seo_urls5/uri_modules/osc_experimental.php Find ( line 49 ) public function isValidUri() { Change TEMPORARILY to: - public function isValidUri() { // REMOVE ME if ( array_key_exists( 'fwrtest', $_GET ) ) { die( '<pre>' . print_r( array( DIR_WS_CATALOG, Usu_Main::i()->getVar( 'filename' ) ), true ) . '</pre>' ); } // END REMOVE ME Then access your site like www.mysite.com/?fwrtest and post the results here The multi-store basically stores the config in a database which makes it possible to have mutliple store front-ends every front-end has its own config table (store1.table_configuration, store2_table_configuration etc) The results of the fwrtest: Array ( [0] => / [1] => Index.php ) Fatal error: Call to a member function store() on a non-object in ****\mystore.com\****\includes\modules\ultimate_seo_urls5\main\usu5.php on line 78 Thank you again ;) Edited May 11, 2011 by roadkill Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted May 11, 2011 Author Share Posted May 11, 2011 The multi-store basically stores the config in a database which makes it possible to have mutliple store front-ends every front-end has its own config table (store1.table_configuration, store2_table_configuration etc) The results of the fwrtest: Thank you again ;) Is it my eyes ( no pun intended ) or is that a capital I at the front of Index.php Denkster 1 Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
♥FWR Media Posted May 11, 2011 Author Share Posted May 11, 2011 Hi again Robert ... :) This I would like to have a fix for: Error Type: [E_NOTICE] Undefined offset: 3 On line 84, 86 & 87 File includes/modules/ultimate_seo_urls5/uri_modules/osc_experimental.php Since I am near to a "perfect site" ... Many, many thanks to you! Sara Your code has issues or it wouldn't be passing a key without a value .. however: - includes/modules/ultimate_seo_urls5/uri_modules/osc_experimental.php Find ( line 83 ) for ( $i=0; $i<$count; $i=$i+2 ) { Change to .. for ( $i=0; $i<$count; $i=$i+2 ) { if ( !array_key_exists( $i+1, $tmp ) ) continue; Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.