Jump to content

Redirecting non-www to www in Prestashop 1.5.4.1


Recommended Posts

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 ^(.*)$
[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

  • 3 months later...
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

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 by Bill Dalton (see edit history)
Link to comment
Share on other sites

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

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. B)

Edited by Bill Dalton (see edit history)
  • Like 1
Link to comment
Share on other sites

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 by Bill Dalton (see edit history)
  • Like 1
Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...