rgwhitaker Posted August 16, 2013 Share Posted August 16, 2013 I've recently downloaded 1.5.4.1 and just today thought that I needed to put in my .htaccess file the code to redirect the non-www to the www site. I put the following code in my .htaccess file: RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] Now when I attempt to go to my site, I receive the following error in Firefox: The page isn't redirecting properly Firefox has detected that the server is redirecting the request for this address in a way that will never complete. I've also tried using the specific URL information and still receive the same error. Interesting, when I remove, or comment out, the above code, I can go to my site just fine. I need, and want, to redirect the non-www to the www version of the site. How can I do that? Link to comment Share on other sites More sharing options...
tomerg3 Posted August 16, 2013 Share Posted August 16, 2013 See http://www.presto-changeo.com/en/content/6-prestashopseotips Link to comment Share on other sites More sharing options...
rgwhitaker Posted August 16, 2013 Author Share Posted August 16, 2013 Thanks. Tried that. Still doesn't work. Link to comment Share on other sites More sharing options...
tomerg3 Posted August 16, 2013 Share Posted August 16, 2013 Can you post the exact code you added to your htaccess? There's no reason for it not to work, as I've used it on every single website I developed Link to comment Share on other sites More sharing options...
rgwhitaker Posted August 16, 2013 Author Share Posted August 16, 2013 I've used both of the codes below. Neither works. RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] RewriteEngine on RewriteCond %{HTTP_HOST} ^mysite.com RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=301,L] Link to comment Share on other sites More sharing options...
tomerg3 Posted August 16, 2013 Share Posted August 16, 2013 Did you use your real URL? If not, try it... If you did, try using only this code in the htaccess and see if that helps. 1 Link to comment Share on other sites More sharing options...
robbie007 Posted August 22, 2013 Share Posted August 22, 2013 Hi Guys! There misses one piece of code. you have forgotten to add the $ after the .com (so must be .com$) So code will be: RewriteEngine on RewriteCond %{HTTP_HOST} ^mysite.com$ RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=301,L] But thanks for the redirect, needed it for one of my sites. 1 Link to comment Share on other sites More sharing options...
wilson113311 Posted December 10, 2013 Share Posted December 10, 2013 Hi I cannot seem to find my .htaccess file anywhere can someone help with this? And also the code I need to enter to direct tillrollshop.com to www.tillrollshop.com? ? Link to comment Share on other sites More sharing options...
Bill Dalton Posted December 10, 2013 Share Posted December 10, 2013 Preferences > SEO & URLs Automatically redirect to the canonical URL - set this to YES Below that, see the section for Shop URL enter your domain as www.tillrollshop.com Don't forget to click the save button in the top right corner. That should do it. No need to go into your .htaccess file. Link to comment Share on other sites More sharing options...
wilson113311 Posted December 10, 2013 Share Posted December 10, 2013 Many thanks for the speedy reply I have checked these settings and these was already set like you said but tillrollshop.com just says not available when searched Link to comment Share on other sites More sharing options...
Bill Dalton Posted December 10, 2013 Share Posted December 10, 2013 >>but tillrollshop.com just says not available when searched Wilson, very sorry, I don't know what you mean by that. Link to comment Share on other sites More sharing options...
wilson113311 Posted December 11, 2013 Share Posted December 11, 2013 Hi Bill, Yes all you said is what is happening and I do have SFTP access to my server? Is this something you can fix? Link to comment Share on other sites More sharing options...
Bill Dalton Posted December 11, 2013 Share Posted December 11, 2013 In your Prestashop you should, VIA FTP, find a file .htaccess. You mention above that you had looked for this file but did not see one. Is this correct? Link to comment Share on other sites More sharing options...
wilson113311 Posted December 11, 2013 Share Posted December 11, 2013 I cant seem to find one at all do you know what location there would be and is there only one? Or is there multiple and I'm looking for a specific one? Link to comment Share on other sites More sharing options...
Bill Dalton Posted December 11, 2013 Share Posted December 11, 2013 It is the root of your Prestashop. You should see all the folders including your admin folder, Modules folder, themes folder, just to name a few. You should also see many files with a .php file extension and an .htaccess. Link to comment Share on other sites More sharing options...
wilson113311 Posted December 11, 2013 Share Posted December 11, 2013 Hi Bill, I have logged in via sftp and there is no sign of the .htaccess? Link to comment Share on other sites More sharing options...
Bill Dalton Posted December 11, 2013 Share Posted December 11, 2013 (edited) Strange. But even without the file your web site should not give an error page for your web site. Do you know if your web server is Linux or Windows? If it is Windows, instead of an .htaccess you should see web.config. Edited December 11, 2013 by Bill Dalton (see edit history) Link to comment Share on other sites More sharing options...
wilson113311 Posted December 11, 2013 Share Posted December 11, 2013 Its on a Linux server hosted with Rackspace? Will this affect my sites listing and such? As I have three sites on this same server now and none which have a .htaccess file. I could send you the login if you would like to a look Link to comment Share on other sites More sharing options...
Bill Dalton Posted December 11, 2013 Share Posted December 11, 2013 (edited) No that is ok. But this seems to be a configuration issue. I took a look at Rackspace and .htaccess is hidden. You need to unhide it, please see this page and let me know how you get along, http://www.rackspace.com/knowledge_center/article/how-can-i-see-my-htaccess-file Edited December 11, 2013 by Bill Dalton (see edit history) Link to comment Share on other sites More sharing options...
Bill Dalton Posted December 11, 2013 Share Posted December 11, 2013 I also want you to look at this page, http://www.rackspace.com/apps/support/portal/1210 This will show you how to get to your domain settings, I want you to make sure your domain is setup as per the instructions on that page. I'm mainly interested to know if you have your 2 A (Address) records set. Link to comment Share on other sites More sharing options...
wilson113311 Posted December 11, 2013 Share Posted December 11, 2013 I only have access to the server via SFTP at the moment and when telling Filezilla to do the following - FileZilla 3 1. Start FileZilla then select the "Server" menu at the top 2. Select "Force showing Hidden Files" This still doesn't show any .htaccess files? I will have to contact rackspace first any see if there can see one? Would this be affecting people visiting the site and such do you know? Link to comment Share on other sites More sharing options...
wilson113311 Posted December 11, 2013 Share Posted December 11, 2013 Also my domain was registered through 123-reg and the following is my dns which I only have set up which is - WWW A My IP of Server That is all? Link to comment Share on other sites More sharing options...
Bill Dalton Posted December 11, 2013 Share Posted December 11, 2013 (edited) Ok, That is our main problem, you need to add an additional A record, just like the one you have, but instead of WWW use @ Just make sure you add an additional entry, don't edit the one you have. Let me know when you have that done. That is our main worry and we will sort the canonical URL problem once we have one to sort. Not to worry, your search engines standings are going to improve from this day on. Edited December 11, 2013 by Bill Dalton (see edit history) 1 Link to comment Share on other sites More sharing options...
wilson113311 Posted December 12, 2013 Share Posted December 12, 2013 Hi Bill, I have now set up the new record. Is there something else I need to do or is it good to go now? Do you have any ideas on how to gain good ranking as there are many contradicting views over the internet? Link to comment Share on other sites More sharing options...
Bill Dalton Posted December 12, 2013 Share Posted December 12, 2013 (edited) Very good Wilson, in fact when you now put tillrollshop.com in a browser, instead of an error page Prestashop redirects to the canonical URL. So that takes care of all our problems. Good job Wilson. Good ranking is as easy as loosing weight. What I mean by that? All you need to do is follow a simple "menu". Meta title tag of your page. Words on your page Inbound links to your page. The good news for you is that you are already doing the first 2 correct. Here is one of your pages, http://www.tillrollshop.com/index.php?id_product=74&controller=product&id_lang=1 the older web browsers at one time showed the title meta tag at the top of the browser, but with modern browsers you need to hold your mouse over the tab in your browser, and if you do for the above page you will see, "Brand New Casio SE-G1 Cash Register (Black)" Prestashop automatically uses the name of the product and usually that is perfect. That said, Prestashop does provide a way to put something else there if you wish. Words on the page are good, you are using all the words that people may be searching for in relation to your product. Inbound links? Today the best inbound links can be from social web sites. From Facebook to Pinterest, you will need to open accounts and read up on best practises for taking advantage. Fortunately Prestashop has available modules that can help automate and encourage your site visitor's to engage, So, one and two, you follow the menu and you make this part of building your web site. Number 3 is more like body building, it requires more effort and time. Don't try too hard all at once. You may get bored and fail. Take it slow. Learn. You will get better. Your web site is good Wilson. You are doing a great job. Edited December 12, 2013 by Bill Dalton (see edit history) 1 Link to comment Share on other sites More sharing options...
Bill Dalton Posted December 12, 2013 Share Posted December 12, 2013 One last thing while I have your attention. Preferences > SEO & URLs Find the settings for Frendly URLS and turn it on. Don't forget to hit the save button on the right hand side. If this works, it might make your images disappear. Not to worry, first try clearing your browser cache. If you still cannot see your images go to Advanced Parameters > Performance Choose Force compilation and disable Cache. And if that dosen't work then go to Preferences > Images and scroll down to Regenerate thumbnails, click the button. 1 Link to comment Share on other sites More sharing options...
wilson113311 Posted December 12, 2013 Share Posted December 12, 2013 Many thanks Bill for all your great work and super advice it is much appreciated! Hopefully can get this site making some good money now 1 Link to comment Share on other sites More sharing options...
Recommended Posts