Ted Thompson Posted December 23, 2010 Share Posted December 23, 2010 I was having trouble with the htaccess too. But since I know 1and1 "tech support" are total tools, I just mucked about to find an answer. Here's what seems to work. (BTW FRW Media, TOP SHELF addon here. Great docs, etc. I had to hand add it to a modded 2.3 site and your directions were spot on!) <IfModule mod_rewrite.c> RewriteEngine On # RewriteBase instructions # Change RewriteBase dependent on how your shop is accessed as below. # http://www.mysite.com = RewriteBase / # http://www.mysite.com/catalog/ = RewriteBase /catalog/ # http://www.mysite.com/catalog/shop/ = RewriteBase /catalog/shop/ # Change RewriteBase using the instructions above RewriteBase / RewriteRule ^(.*)-p-([0-9]+).html$ product_info.php [NC,L,QSA] RewriteRule ^(.*)-c-([0-9_]+).html$ index.php [NC,L,QSA] RewriteRule ^(.*)-m-([0-9]+).html$ index.php [NC,L,QSA] RewriteRule ^(.*)-pi-([0-9]+).html$ popup_image.php [NC,L,QSA] RewriteRule ^(.*)-pr-([0-9]+).html$ product_reviews.php [NC,L,QSA] RewriteRule ^(.*)-pri-([0-9]+).html$ product_reviews_info.php [NC,L,QSA] # Articles contribution RewriteRule ^(.*)-t-([0-9_]+).html$ articles.php [NC,L,QSA] RewriteRule ^(.*)-a-([0-9]+).html$ article_info.php [NC,L,QSA] # Information pages RewriteRule ^(.*)-i-([0-9]+).html$ information.php [NC,L,QSA] # Links contribution RewriteRule ^(.*)-links-([0-9_]+).html$ links.php [NC,L,QSA] # Newsdesk contribution RewriteRule ^(.*)-n-([0-9]+).html$ newsdesk_info.php [NC,L,QSA] RewriteRule ^(.*)-nc-([0-9]+).html$ newsdesk_index.php [NC,L,QSA] RewriteRule ^(.*)-nri-([0-9]+).html$ newsdesk_reviews_info.php [NC,L,QSA] RewriteRule ^(.*)-nra-([0-9]+).html$ newsdesk_reviews_article.php [NC,L,QSA] </IfModule> So it seems that the "[a-z0-9-/]+" part of the rules is the bone in contention on 1and1 (bear in mind they use a server farm of C64s powered by malnourished squirrels). So, do you see any potential problem with my version? Also, it doesn't seeem to matter if I use +FollowSymLinks or +SymLinksIfOwnerMatch, so which should I use? Or should I use both? Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted December 23, 2010 Author Share Posted December 23, 2010 (edited) I was having trouble with the htaccess too. But since I know 1and1 "tech support" are total tools, I just mucked about to find an answer. Here's what seems to work. (BTW FRW Media, TOP SHELF addon here. Great docs, etc. I had to hand add it to a modded 2.3 site and your directions were spot on!) So it seems that the "[a-z0-9-/]+" part of the rules is the bone in contention on 1and1 (bear in mind they use a server farm of C64s powered by malnourished squirrels). So, do you see any potential problem with my version? Also, it doesn't seeem to matter if I use +FollowSymLinks or +SymLinksIfOwnerMatch, so which should I use? Or should I use both? Hi Ted ( if your name is Ted ) :) Thanks for the kind words and for testing these rules for me. You should most definately use the one that was not commented out +SymLinksIfOwnerMatch it is much more secure. ( I'm surprised 1 and 1 allow the other ). Could you try the following for me please? [a-z0-9\-\/]+ so it would look like .. RewriteRule ^([a-z0-9\-\/]+)-p-([0-9]+).html$ product_info.php [NC,L,QSA] Edited December 23, 2010 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...
Guest Posted December 23, 2010 Share Posted December 23, 2010 Installed just fine and everything is working great except one item. Thank you. Looks like you worked hard and have a great product. I upgraded from the old chemo system which used to swtitch back to a NONSSL link whe you are on a shred SSl page . Now when you are on a shared SSL page such as during checkout and you click on a category or product - it keeps the same shared SSL URL and we get a: Oops! This link appears broken.DNS error occurred. Server cannot be found. error Of course, all non product or category pages still work the same, no problems. How can we adjust it so we always go to a NONSSL category or product info page whether we are on a NONSSL or shared SSL page? Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted December 23, 2010 Author Share Posted December 23, 2010 Installed just fine and everything is working great except one item. Thank you. Looks like you worked hard and have a great product. I upgraded from the old chemo system which used to swtitch back to a NONSSL link whe you are on a shred SSl page . Now when you are on a shared SSL page such as during checkout and you click on a category or product - it keeps the same shared SSL URL and we get a: Oops! This link appears broken.DNS error occurred. Server cannot be found. error Of course, all non product or category pages still work the same, no problems. How can we adjust it so we always go to a NONSSL category or product info page whether we are on a NONSSL or shared SSL page? Not sure what you mean .. this works just like the standard osC tep_href_link and Chemos, it defaults to NONSSL unless SSL is specifically passed through. 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...
Guest Posted December 23, 2010 Share Posted December 23, 2010 One other thing I just noticed We are now getting ?osCsid=d3fc6fcfaa8a733c2e21ba0719209501 at the end of every URL on any file such as: checkout_payment.php?osCsid=6cd90849f89c5626b8f0ec5d3b75fa55 This must be a result of this upgrade also. We had filtered that out from showing with .htaccess code and/or another contribution but it looks like ULTIMATE Seo Urls 5 is forcing that on the end now. How can we lose that trailing ?osCsid so the customer or google does not see it? Thank you again Quote Link to comment Share on other sites More sharing options...
Guest Posted December 23, 2010 Share Posted December 23, 2010 When you are on the main index page everything works fine. You are in the root of the site at that point and using our domain name. Then when you checkout from the shopping cart you enter into a shared SSL page which has a totally different domain and URL named after the server we are on So if you click on a product picture in the left column you stay in the shred SSL domain instead of going back to our NONSSL domain. The name of the product is correct and the same but the domain in front of it does not switch back. Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted December 23, 2010 Author Share Posted December 23, 2010 When you are on the main index page everything works fine. You are in the root of the site at that point and using our domain name. Then when you checkout from the shopping cart you enter into a shared SSL page which has a totally different domain and URL named after the server we are on So if you click on a product picture in the left column you stay in the shred SSL domain instead of going back to our NONSSL domain. The name of the product is correct and the same but the domain in front of it does not switch back. Could you try something for me please? catalog/includes/modules/ultimate_seo_urls5/abstracts/page_modules.php Find .. $this->urlInitial = Usu_Main::i()->getVar( 'request_type' ) == 'NONSSL' ? Usu_Main::i()->getVar( 'base_url' ) : Usu_Main::i()->getVar( 'base_url_ssl' ); Change to ... $this->urlInitial = $connection == 'NONSSL' ? Usu_Main::i()->getVar( 'base_url' ) : Usu_Main::i()->getVar( 'base_url_ssl' ); 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...
Guest Posted December 23, 2010 Share Posted December 23, 2010 Could you try something for me please? catalog/includes/modules/ultimate_seo_urls5/abstracts/page_modules.php Find .. $this->urlInitial = Usu_Main::i()->getVar( 'request_type' ) == 'NONSSL' ? Usu_Main::i()->getVar( 'base_url' ) : Usu_Main::i()->getVar( 'base_url_ssl' ); Change to ... $this->urlInitial = $connection == 'NONSSL' ? Usu_Main::i()->getVar( 'base_url' ) : Usu_Main::i()->getVar( 'base_url_ssl' ); Totally wonderful !!! Works great everywhere now. I tested it on the login page too. Both the categories (which is cached and I thought that might be an issue) and the product_info links work normal form NONSSL and SSL pages. Hope my problem helps you - maybe include this info or change code for others? thank you so much for the super quick replies Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted December 23, 2010 Author Share Posted December 23, 2010 Totally wonderful !!! Works great everywhere now. I tested it on the login page too. Both the categories (which is cached and I thought that might be an issue) and the product_info links work normal form NONSSL and SSL pages. Hope my problem helps you - maybe include this info or change code for others? thank you so much for the super quick replies Very glad to help you and thanks for helping me! The bad news is that you uncovered a nasty .. BIG .. HAIRY bug. Regarding the osCsid this is not a problem of the contribution .. it produces the session id when it is correct to do so .. you should NEVER need to hide the osCsid .. if you do have to it simply means your config files are wrong. thanks again Randy. 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 December 23, 2010 Author Share Posted December 23, 2010 IMPORTANT Randy uncovered a nasty bug. Everyone who has downloaded this needs to apply the change in the below post .. http://www.oscommerce.com/forums/topic/336702-ultimate-seo-urls-5-by-fwr-media/page__view__findpost__p__1554022 In the mean time I will upload a new revision and get the current one supressed. 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 December 23, 2010 Author Share Posted December 23, 2010 (edited) Sorry should have mentioned .. the above comment relates only to the brand new PRO version and not to the original USU5. Edited December 23, 2010 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...
Ted Thompson Posted December 23, 2010 Share Posted December 23, 2010 Hi Ted ( if your name is Ted ) :) Thanks for the kind words and for testing these rules for me. You should most definately use the one that was not commented out +SymLinksIfOwnerMatch it is much more secure. ( I'm surprised 1 and 1 allow the other ). Could you try the following for me please? [a-z0-9\-\/]+ so it would look like .. RewriteRule ^([a-z0-9\-\/]+)-p-([0-9]+).html$ product_info.php [NC,L,QSA] It does NOT cause a 500 error, but it does result in a 404 error... Quote Link to comment Share on other sites More sharing options...
Ted Thompson Posted December 23, 2010 Share Posted December 23, 2010 Also, just FYI, your 404 page for when items/cats are not found is missing <html><head> and <body> tags... Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted December 23, 2010 Author Share Posted December 23, 2010 (edited) It does NOT cause a 500 error, but it does result in a 404 error... Sorry to impose on you Ted but I have tried this on 5 servers and can't replicate the problem so need some help on the 1 and 1 issue. Could you try .. [a-z0-9-\/]+ [a-z0-9\-/]+ [a-z0-9/-]+ [a-z0-9\/-]+ [a-z0-9/\-]+ Edited December 23, 2010 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...
♥FWR Media Posted December 23, 2010 Author Share Posted December 23, 2010 Also, just FYI, your 404 page for when items/cats are not found is missing <html><head> and <body> tags... Well tbh it's an error page it has no reason to validate and no intention to index. 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...
Ted Thompson Posted December 23, 2010 Share Posted December 23, 2010 (edited) Sorry to impose on you Ted but I have tried this on 5 servers and can't replicate the problem so need some help on the 1 and 1 issue. Could you try .. [a-z0-9-\/]+ [a-z0-9\-/]+ [a-z0-9/-]+ [a-z0-9\/-]+ [a-z0-9/\-]+ # 500 RewriteRule ^([a-z0-9-\/]+).html$ product_info.php [NC,L,QSA] # 500 RewriteRule ^([a-z0-9\-/]+).html$ product_info.php [NC,L,QSA] # W RewriteRule ^([a-z0-9/-]+).html$ product_info.php [NC,L,QSA] # W RewriteRule ^([a-z0-9\/-]+).html$ product_info.php [NC,L,QSA] # W RewriteRule ^([a-z0-9/\-]+).html$ product_info.php [NC,L,QSA] Where I used "W" it worked fine, no difference in behavior from what I could see. Where I used "500" it threw a 500 Internal Server Error at me. :shrugs: :huh: (So which one should I use? :blink: ) Well tbh it's an error page it has no reason to validate and no intention to index. Fair enough! :D Edited December 23, 2010 by TedThompson Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted December 24, 2010 Author Share Posted December 24, 2010 (edited) # 500 RewriteRule ^([a-z0-9-\/]+).html$ product_info.php [NC,L,QSA] # 500 RewriteRule ^([a-z0-9\-/]+).html$ product_info.php [NC,L,QSA] # W RewriteRule ^([a-z0-9/-]+).html$ product_info.php [NC,L,QSA] # W RewriteRule ^([a-z0-9\/-]+).html$ product_info.php [NC,L,QSA] # W RewriteRule ^([a-z0-9/\-]+).html$ product_info.php [NC,L,QSA] Where I used "W" it worked fine, no difference in behavior from what I could see. Where I used "500" it threw a 500 Internal Server Error at me. :shrugs: :huh: (So which one should I use? :blink: ) Fair enough! :D Sorry to confuse you Ted and the range of options proved that I myself was confused. The problem my end is that I learnt the newer and more widely used PCRE but never learnt the old POSIX but PCRE and POSIX have a lot of similarities that normally get me through .. but .. Apache 1.3 shipped with POSIX .. later versions had compatibility with PCRE but a lot of PCRE doesn't actually work .. so .. I get a bit confused. Back to the problem at hand .. Seems to me like it may be as simple as .. ^([a-z0-9-/]+) Doesn't work .. whereas .. ^([a-z0-9/-]+) does. could you try it please? Once we have this nailed I will release a new revision covering this and the "Randy" bug. Edited December 24, 2010 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...
Ted Thompson Posted December 24, 2010 Share Posted December 24, 2010 Sorry to confuse you Ted and the range of options proved that I myself was confused. The problem my end is that I learnt the newer and more widely used PCRE but never learnt the old POSIX but PCRE and POSIX have a lot of similarities that normally get me through .. but .. Apache 1.3 shipped with POSIX .. later versions had compatibility with PCRE but a lot of PCRE doesn't actually work .. so .. I get a bit confused. Back to the problem at hand .. Seems to me like it may be as simple as .. ^([a-z0-9-/]+) Doesn't work .. whereas .. ^([a-z0-9/-]+) does. could you try it please? Once we have this nailed I will release a new revision covering this and the "Randy" bug. # 500 RewriteRule ^([a-z0-9-/]+).html$ product_info.php [NC,L,QSA] # W RewriteRule ^([a-z0-9/-]+).html$ product_info.php [NC,L,QSA] Again, "500" errs, and "W" works, so it would appear that you are correct. (I don't get any of these comparison strings myself...) Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted December 24, 2010 Author Share Posted December 24, 2010 # 500 RewriteRule ^([a-z0-9-/]+).html$ product_info.php [NC,L,QSA] # W RewriteRule ^([a-z0-9/-]+).html$ product_info.php [NC,L,QSA] Again, "500" errs, and "W" works, so it would appear that you are correct. (I don't get any of these comparison strings myself...) That's great Ted thanks for your support. ^([a-z0-9/-]+) Is the way to go then .. I will update the contribution. 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...
Ted Thompson Posted December 24, 2010 Share Posted December 24, 2010 (edited) That's great Ted thanks for your support. ^([a-z0-9/-]+) Is the way to go then .. I will update the contribution. So this is what I have now # If you are getting errors you may need to comment this out like .. # Options +FollowSymLinks Options +SymLinksIfOwnerMatch <IfModule mod_rewrite.c> RewriteEngine On # RewriteBase instructions # Change RewriteBase dependent on how your shop is accessed as below. # http://www.mysite.com = RewriteBase / # http://www.mysite.com/catalog/ = RewriteBase /catalog/ # http://www.mysite.com/catalog/shop/ = RewriteBase /catalog/shop/ # Change RewriteBase using the instructions above RewriteBase / # 500 RewriteRule ^([a-z0-9-/]+).html$ product_info.php [NC,L,QSA] # W RewriteRule ^([a-z0-9/-]+).html$ product_info.php [NC,L,QSA] RewriteRule ^([a-z0-9/-]+)-p-([0-9]+).html$ product_info.php [NC,L,QSA] 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/-]+)-pi-([0-9]+).html$ popup_image.php [NC,L,QSA] RewriteRule ^([a-z0-9/-]+)-pr-([0-9]+).html$ product_reviews.php [NC,L,QSA] RewriteRule ^([a-z0-9/-]+)-pri-([0-9]+).html$ product_reviews_info.php [NC,L,QSA] # Articles contribution RewriteRule ^([a-z0-9/-]+)-t-([0-9_]+).html$ articles.php [NC,L,QSA] RewriteRule ^([a-z0-9/-]+)-au-([0-9]+).html$ articles.php [NC,L,QSA] RewriteRule ^([a-z0-9/-]+)-a-([0-9]+).html$ article_info.php [NC,L,QSA] # Information pages RewriteRule ^([a-z0-9/-]+)-i-([0-9]+).html$ information.php [NC,L,QSA] # Links contribution RewriteRule ^([a-z0-9/-]+)-links-([0-9_]+).html$ links.php [NC,L,QSA] # Newsdesk contribution RewriteRule ^([a-z0-9/-]+)-n-([0-9]+).html$ newsdesk_info.php [NC,L,QSA] RewriteRule ^([a-z0-9/-]+)-nc-([0-9]+).html$ newsdesk_index.php [NC,L,QSA] RewriteRule ^([a-z0-9/-]+)-nri-([0-9]+).html$ newsdesk_reviews_info.php [NC,L,QSA] RewriteRule ^([a-z0-9/-]+)-nra-([0-9]+).html$ newsdesk_reviews_article.php [NC,L,QSA] </IfModule> Correct? Edited December 24, 2010 by TedThompson Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted December 24, 2010 Author Share Posted December 24, 2010 So this is what I have now Correct? Spot on. 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...
Ted Thompson Posted December 24, 2010 Share Posted December 24, 2010 Thank YOU for the support!! :lol: Quote Link to comment Share on other sites More sharing options...
chrish123 Posted December 24, 2010 Share Posted December 24, 2010 Thank YOU for the support!! :lol: Been busy the last couple of days, though I did find out 1&1 have strict regex and was going to look into it, Very thankful here too, it works great! Quote Link to comment Share on other sites More sharing options...
chrish123 Posted December 24, 2010 Share Posted December 24, 2010 I forgot to mention the sitemap generator dosent work for me, all I get is a blank page. If I change: chdir( '../' ); To anything else like below then I get path errors etc, but the sitemapindex.xml is generated. chdir( '.../' ); Also tried the below that just prints out the path, but the chdir is the same as "../" : $mypath="/homepages/45/d56756756/htdocs/www/"; chdir($mypath); // current directory echo getcwd() . "\n"; Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted December 24, 2010 Author Share Posted December 24, 2010 I forgot to mention the sitemap generator dosent work for me, all I get is a blank page. If I change: chdir( '../' ); To anything else like below then I get path errors etc, but the sitemapindex.xml is generated. chdir( '.../' ); Also tried the below that just prints out the path, but the chdir is the same as "../" : $mypath="/homepages/45/d56756756/htdocs/www/"; chdir($mypath); // current directory echo getcwd() . "\n"; You don't need to change the file. PM me your email address and I'll send you a new file to try. 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.