Jump to content
Sign in to follow this  
jmass78

[SOLVED] WWW and SSL

Recommended Posts

Hello,

I was wondering if Prestashop had a way of configuring the shop links so that if a visitor typed in our url using www it would remove the www on links while they are browsing. Our SSL is setup without the www and it would be a smoother experience if the visitor didnt get an invalid certificate error if the choose to create an account.

I know this is possible on other shopping carts weve used.

Thanks for your help!

Share this post


Link to post
Share on other sites

I know right. I've been wondering the same thing. I really don't want to have to waste more money buying another SSL Certificate if I can help it.

Although there should be someone who knows something about scripting and coding who can give us a line or two to put into our init.php file where the ssl commands are kept.

Please help us guys.

Share this post


Link to post
Share on other sites

I had a look at this and this redirects to a www.
In my cpanel I have already redirected the URL to my prestashop without the www, yet when I turn prestashops SSL option on, as soon as it tries to go to an encrypted page, it shoves the www right back on the front.

Now I have found the script for this in the init.php file but seeing as though I cannot code I need someone to help.

Share this post


Link to post
Share on other sites

Found it!!

If friendly URL's doesnt solve it for you then you need to edit the .htaccess in your home directory to contain the following lines:

RewriteCond %{HTTP_HOST} ^www.example.com$ [NC]
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]

just replace example with your domain and works like a charm! ;)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More