Jump to content

Force SSL / HTTPS connection for all pages


Recommended Posts

Afternoon all,

 

I am looking for some suggestions. I have read through a few topics and tried a few things but can not seem to find resolution to this problem.

 

Quite simply (in theory) I would like to force an SSL conection for all pages within my site www.organic-one-world.com.

 

I have installed my certificate and have activated the SSL option in the back end. However all this has done is activate the HTTPs connection for log in and payment pages. Which I understand is the default set up for PrestaShop.

 

I have looked into .htaccess files at route level, but see there are many .htaccess files installed across all of prestashop. Is there a way I can default every connection to a HTTPS connection using this type of file?

 

I realise that SSL will slow down the website, but this is a must for the client.

 

Does anyone have any other experiences setting this up and any suggestions for achieving this?

 

If you need me to provide more details I can, just ask.

 

Thank you in advance for your help.

 

Martin

  • Like 1

Share this post


Link to post
Share on other sites

Add an htaccess redirect from http:// to https://

 

It would be something like (I have not tested)

[size=2]RewriteCond %{HTTP_HOST} ^http://www.your_site.com
RewriteRule ^(.*)$ https://www.yoursite.com/$1 [R=301,L] [/size]

Share this post


Link to post
Share on other sites

Hi tomerg3,

 

Thank you for the reply, I have tried this example before and could not get it to work, however I am unsure of where it would need to go.

There are a lot of .htaccess files acrosse the site, does it need to be added to all of them?

 

I currently have this text at the top of my .htaccess file on my home directory

 

RewriteEngine on

RewriteCond %{HTTP_HOST} ^organic-one-world.com$

RewriteRule . - [E=REWRITEBASE:/shopping/]

RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]

 

How would the example you have given fit in? Before / After / Instead of?

 

There dosen't seem to be much on this, and I am surprised. I can see this becoming standard practice in the not to distant future and it woulld be good to be prepared.

 

Thanks for your help :)

Share this post


Link to post
Share on other sites

Hi Benjamin,

 

Thank you for your help too. I have not come across this particular example on my tracks, but I have a similar problem to that of tomegr3's example.

 

Where would I add this text into the file?

 

Here is what the file currently looks like:

 

<?php

/*

* 2007-2013 PrestaShop

*

* NOTICE OF LICENSE

*

* This source file is subject to the Open Software License (OSL 3.0)

* that is bundled with this package in the file LICENSE.txt.

* It is also available through the world-wide-web at this URL:

* http://opensource.org/licenses/osl-3.0.php

* If you did not receive a copy of the license and are unable to

* obtain it through the world-wide-web, please send an email

* to license@prestashop.com so we can send you a copy immediately.

*

* DISCLAIMER

*

* Do not edit or add to this file if you wish to upgrade PrestaShop to newer

* versions in the future. If you wish to customize PrestaShop for your

* needs please refer to http://www.prestashop.com for more information.

*

* @author PrestaShop SA <contact@prestashop.com>

* @copyright 2007-2013 PrestaShop SA

* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

* International Registered Trademark & Property of PrestaShop SA

*/

 

/**

* This file will be removed in 1.6

*/

 

if (isset(Context::getContext()->controller))

$controller = Context::getContext()->controller;

else

{

$controller = new FrontController();

$controller->init();

}

 

There are 2 init.php files located in my shopping directory the other has this section in it....

 

/* Server Params */

$protocol_link = (Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://';

$protocol_content = (isset($useSSL) AND $useSSL AND Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://';

$link = new Link($protocol_link, $protocol_content);

$context->link = $link;

 

This is located in the admin area. Could this be the type of thing I need, which also fits in with your suggestion?

 

I am eager to get this fixed as soon as possible. :unsure:

 

Thanks for your help.

Share this post


Link to post
Share on other sites

Ok, so I have tested the code, and added it to the end of the file, I also placed it into another .htaccess file in a different directory, and then in both, but each time it did not make a different.

 

When i go to the site, the address in the address bar will be organic-one-world.com/shopping/gb if I then add https://www. to the beggining I get a 404 error.

 

Really stuggling to understand this.

 

I wonder if there is something else, somewhere having an effect which is preventing my changes from having effect.

 

The site will never stay on organic-one-world.com it will always go to /shopping/

 

Does this matter?

Share this post


Link to post
Share on other sites

Hi tomerg3,

 

would you be able to share the file in full with me, and specify exactly which .htaccess file you are uploading it to?

I have tried again but it is not making a difference.

 

Thank you

Share this post


Link to post
Share on other sites

Try using

RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} 

You could save yourself some time and just Google "redirect http to https" which is what I did...

  • Like 1

Share this post


Link to post
Share on other sites

Morning, but the google redirect, surley this will not help for anyone typing in an address?

 

I fear I may be making this more difficult than it needs to be!

 

I am now having trouble with basic connections, not all of the following go to https://www.mysite.com/shopping/'>https://www.mysite.com/shopping/

 

mysite.com -OK

www.mysite,com - OK

http://mysite.com -OK

http://www.mysite.com - OK

https://mysite.com - 'This page can't be displayed'

https://www.mysite.com - 'This page can't be displayed'

 

Which .htaccess file are you uploading this code too??

Share this post


Link to post
Share on other sites

  • 5 weeks later...
  • 1 month later...

I modified file classes/Tools.php

 

public static function getShopDomain($http = false, $entities = false)
{
if (!$domain = ShopUrl::getMainShopDomain())
$domain = Tools::getHttpHost();
if ($entities)
$domain = htmlspecialchars($domain, ENT_COMPAT, 'UTF-8');
if ($http)
//$domain = 'http://'.$domain;
$domain = 'https://'.$domain;
return $domain;
}

Edited by phppp (see edit history)
  • Like 2

Share this post


Link to post
Share on other sites

Please help me 

when I entered https://www.sialkotshop.com

it redirected to http://www.sialkotshop.com

and when we browse secured pages like login and my account etc browswer shows that some content is unsecure

it happen after up grade to 1.5.5 from 1.5.4 

I'm using third party theme 

How I stop this redirecation ?

Edited by Online Sports Shop (see edit history)

Share this post


Link to post
Share on other sites

Please help me 

when I entered https://www.sialkotshop.com

it redirected to http://www.sialkotshop.com

and when we browse secured pages like login and my account etc browswer shows that some content is unsecure

it happen after up grade to 1.5.5 from 1.5.4 

I'm using third party theme 

How I stop this redirecation ?

 

 

 

Hi Online sport shop, I can only help you with the insecure content only, about the redirecting, im also facing the difficulties after upgrading to 1.5.5.

 

Surf through the pages and use the combination of " ctrl + shift + j " and you will found which link is not going under secure connection.

 

Please kindly take note that not all of the item / pict have ssl enabled from them, so you might need to manually download and upload it to your own server or any server which ssl is enabled for them.

 

Hope this help.

 

And for others, once before i can force ssl on my web page and on every each of them, but after upgrading to 1.5.5 it seems, i cant do it again, if im using the old configuration previously im using, it will causes redirect loop on my web.

 

My original htaccess contains:

<IfModule mod_rewrite.c>

RewriteEngine on

RewriteCond %{HTTP_HOST} ^store.globalsolution.com.my$

RewriteRule . - [E=REWRITEBASE:/]

RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]

 

Then i replace it become like this:

 

<IfModule mod_rewrite.c>

RewriteEngine on

RewriteCond %{SERVER_PORT} 80

RewriteRule . - [E=REWRITEBASE:/]

RewriteRule ^(.*)$ https://store.globalsolution.com.my/$1 [R,L]

 

Actually, I didn't want to update my previous presta version, but what happened is, i unable to access my back office. I can enter the username and pass page, but then suddenly everything is plain white. blank. so i have to update it to fix whatever error that mysteriously occured.

Edited by khairulaizat92 (see edit history)

Share this post


Link to post
Share on other sites

  • 1 month later...

 

Hi, i had tried to put the code in my htaccess 

 
RewriteEngine On 
RewriteCond %{HTTPS} off
 
 
However, i got this error where it says too many redirect
 
 
please help.
 
Thanks

 

 

Hi there, which version of presta did you use?

 

If it 1.5.5.0 and Above, this method is not working anymore. It just working for 1.4.4.x below.

Share this post


Link to post
Share on other sites

@vekia Funny that new option! Would have helped me 2 month ago when I had a deadlock over SSL on my webserver.

 

@Main poster : I've did a review of how to force SSL in 1.5.4, I've did it for one of my project (www.calorad.com), I've decribed the way to do it in a post for 1.5.4 (In case you didn't upgrade yet)

 

Martin

Share this post


Link to post
Share on other sites

that's correct.

this is new feature in latest version of prestashop.

in my opinion it's very good feature, mainly because some weirdy redirections from non-ssl to ssl and from ssl to non-ssl

glad that it works now! :)

  • Like 1

Share this post


Link to post
Share on other sites

Hi,

 

Me having the same problem, only inner pages are not working with HTTPS. homepage is working fine with HTTPS. 

The Prestashop version that I use is the 1.5.4.1. Can this problem be solved in this version? Or do I have to update to the latest one to get it working?

 

If I have to update this will effect all the modifications that have been made so for me it would really be a big help if this can be fixed in the 1.5.4.1. version.

 

Wilko

Share this post


Link to post
Share on other sites

Hi,

 

Me having the same problem, only inner pages are not working with HTTPS. homepage is working fine with HTTPS. 

The Prestashop version that I use is the 1.5.4.1. Can this problem be solved in this version? Or do I have to update to the latest one to get it working?

 

If I have to update this will effect all the modifications that have been made so for me it would really be a big help if this can be fixed in the 1.5.4.1. version.

 

Wilko

 

Hi ther wilko, the tweak for the previous version proven not permanently successfully in using ssl for the whole pages, so you might going to need to upgrade to 1.5.6.0 if you want to use all SSL on all of your store pages.

 

Believe me, before this im tried everything and even open different topics in different forum other than presta forum, but it failed, so you might want to considering on upgrading to 1.5.6.0, as the previous version of presta, are not so friendly with ssl

Share this post


Link to post
Share on other sites

In my opinion, for PrestaShop stores, you do not need to have ssl on all pages. It creates a significant overhead and definitely will slow your store down. By only using SSL for those transactions where it adds to the security of your store and integrity of your data transaction. Usually, this is done only with the login, account changes, passwords and most importantly Payment transactions.

 

If you are on a shared hosting server there is a chance that you are not able to have ssl on all pages even with the htaccess changes you need. 

Share this post


Link to post
Share on other sites

@Benjamin We don't all want SSL to state to the client : "It's secured", since it doesn't need to be. Stating this would be, like you said, wrong and would lack in performance (I agree, and insist, with the overhead argument)

 

As I said in my post, I ran in a SSL deadlock problem when moving from my test environment to the production one. Prestashop kept redirecting my shop to SSL, then to no-ssl when i was trying to do ajax request. I had three choices : correcting the problem, work on a tweak to keep PS 1.5.4.1 in SSL or drop the ajax cart.

 

Without the Ajax cart, everything was working fine, but the owner of the website really wanted that feature, being redirected to the cart after each add was a but confusing for the user. That was not an option.

 

The correction to the problem was quite hard, as I said, the problem was all server side and in production. All my development tools are unavaible and I wasn't able to reproduce it on the development server. So I wasn't able to know what was going on. Even if I was, I might had needed to write over many classes/controller/module .php file to solve this problem.

 

That being said, I was down to the only option left : Passing every request throught Https, secured protocol. I've tested it quickly in production, by editing manually the js file adding product to the cart.  When it was sending to https, the request returned a 200-ok, when it was sending to http, it returned a 302 or 310, I don't remember well. I worked on a solution (Which I posted here).

 

The need for that feature is not only based on demands, but also on technical problem.

 

Martin

Edited by Martin Uker K (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites

In my opinion, for PrestaShop stores, you do not need to have ssl on all pages. It creates a significant overhead and definitely will slow your store down. By only using SSL for those transactions where it adds to the security of your store and integrity of your data transaction. Usually, this is done only with the login, account changes, passwords and most importantly Payment transactions.

 

If you are on a shared hosting server there is a chance that you are not able to have ssl on all pages even with the htaccess changes you need. 

 

Hi Benjamin,

 

Can you explain how to set up SSL only for the login, account changes, passwords and  importantly Payment transactions pages?

 

Kind Regards,

Wilko

 

enjamiBe

Share this post


Link to post
Share on other sites

yes it's definitely annoying mainly because new feature in all modern browsers. this crappy feature blocks all unsecured connections while you're browsing secured pages. it mean that all ajax queries will not work, why? because prestashop automatically redirects from ssl to non-ssl for pages different than login / authentication. 

 

all modules with ajax queries don't work then  :(

  • Like 2

Share this post


Link to post
Share on other sites

it's necessary to turn on redirection from ssl to non-ssl ;)

if you try to load something with ajax on secured authentication page, you will not able to do this, because prestashop automatically  redirects this query from ssl to non-ssl. 

 

then you will se origin-not allowed in browser console

  • Like 1

Share this post


Link to post
Share on other sites

  • 3 weeks later...

Dear all,

 

I am wrestling with this or simular problem.

 

 

 

There is the ssl force option, which works fine but brings up other issues on the shop with unsecured items, etc.

But what I would like is when I don't force ssl, that I am still able to access my shop over https when I would like to do so.

 

A specifica reason for this, is that I run a facebook shop app which can only connect over ssl to a module page.

This page is forced into non-sll mode and blocks output in facebook.

 

So, does anybody now how to allow ssl when the force ssl option is not enabled.

In other words, make ssl a choice by the end user.

 

Tnx for all tips!

Share this post


Link to post
Share on other sites

Dear all,

 

I am wrestling with this or simular problem.

 

 

 

There is the ssl force option, which works fine but brings up other issues on the shop with unsecured items, etc.

But what I would like is when I don't force ssl, that I am still able to access my shop over https when I would like to do so.

 

A specifica reason for this, is that I run a facebook shop app which can only connect over ssl to a module page.

This page is forced into non-sll mode and blocks output in facebook.

 

So, does anybody now how to allow ssl when the force ssl option is not enabled.

In other words, make ssl a choice by the end user.

 

Tnx for all tips!

 

cas what module yo uuse? i think that i've got solution for this, it is necessary to modify module .php file (define front controller with $this->ssl=true param, then you will be able to use module without having "force ssl" option turned on.

  • Like 1

Share this post


Link to post
Share on other sites

Hi Vekia,

 

I also have been in contact with the developer. (your collegue?)

He created a patch for me by modifying the module.php and loader.php files. (adding the ssl=>true parameter)

This solved the problem. 

 

I thank the mypresta.eu team for their superb service!!!

Share this post


Link to post
Share on other sites

  • 2 weeks later...

Step:1

 

add to .htaccess

 

RewriteCond %{HTTP_HOST} ^www\.(.*)

RewriteRule ^.*$ https://%1/$1 [R=301,L]

 

Step:2

change domain in Preferences > SEO & URLs

to www.yourdomain.com 

 

works perfect for me;

 

Did it work in the 1.5.4.1 version?

 

Do I have to add it like this?

I didn't solve my problem that of the internal links that of are not working with https   :( 

My shop domain  name is www.bmx24seven.com but the ssl won't work on www

I set it in BO at Set shop URL  to bmx24seven.com.

But then I get the message on the main page in the BO. that said

 

  • You are currently connected under the following domain name: www.bmx24seven.com

    This is different from the main shop domain name set in the "Multistore" page under the "Advanced Parameters" menu: bmx24seven.com

    Click here if you want to modify your main shop's domain name.

How can I change this domain name from www.bmx24seven.com to bmx24seven.com?

I also changed the records in my sql table the records for PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL but it don't make a difference.

 

 

Can this be a work arround ?

And how do I put it?

Do I have to put it like this..

 

RewriteEngine On

RewriteCond %{HTTP_HOST} !^www\.bmx24seven.com

RewriteRule ^(.*)$ http://www.bmx24seven.com$1 [R=301,L]

 

The question is because I came by this answers here and I do not know how to put the right info...now

 

# if no subdomain redirect to www#

RewriteCond %{HTTP_HOST} ^something.com$ [NC]

# RewriteRule ^(.*)$ http://www.something.com/$1 [R=301,L]

 

And

 

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteCond %{HTTP_HOST} !^www\.

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

</IfModule>

Edited by WilkoHartung (see edit history)

Share this post


Link to post
Share on other sites

  • 2 months later...

I have Prestashop 1.5.5.0 and none of these solutions have worked for me. In my case it's not possible to upgrade to 1.5.6 because the theme is not compatible.

 

After trying tens of .htaccess combinations, file changes in classes/tools.php and any other different solutions provided or the ones I figured out, normally ending in redirection loops in the browser or other errors, this is the one that has worked for me in ******PRESTASHOP 1.5.5.0 **********/, so I leave it here in case it might help someone:

 

1. Enable SSL in Settings > General.

With this we will be able to go through ssl for cart, order, authentication, account, payment, etc. pages. But of course not for the rest of pages (index, categories, products, etc.)

 

2. Edit /classes/controller/FrontController.php by changing

public $ssl = false;

to

public $ssl = true;

With that you will be able to go through https for most of your shop, however category and product pages will NOT go through https.

 

3. The next obvious step is to go to /controllers/front/CategoryController.php

and

/controllers/front/ProductController.php

and force the ssl on them by adding

public $ssl = true;

in their class variables.

 

We have to do it, however at this point neither category nor product pages will work at all, resulting in redirection loop.

 

To finally solve this:

 

4. Go to your back office > Preferences > SEO and URLs, and check "No" for Redirect automatically for main link (canonical URL). Save. Now category and product pages will work too.

 

5. (Optional) You can also check "Yes" for Friendly URLs. They will work smoothly.

 

After two days struggling with this, this is the solution that has let me force SSL / HTTPS for all my shop's pages.

  • Like 4

Share this post


Link to post
Share on other sites

Hi Ivan,

 

Perhaps check again step 3, in my case they look like follows:

(CategoryController.php)

class CategoryControllerCore extends FrontController
{
	public $php_self = 'category';
	protected $category;
	public $customer_access = true;
	public $ssl = true;

	/**
	 * Set default medias for this controller
	 */
	public function setMedia()
	{
		parent::setMedia();
[...]

and

(ProductController.php)

class ProductControllerCore extends FrontController
{
	public $php_self = 'product';
	public $ssl = true;
	/**
	 * @var Product
	 */
	protected $product;

	/**
	 * @var Category
	 */
	protected $category;

	public function setMedia()
[...]

If it's still failing, what's the exact problem you get?

 

Hope it works :)

  • Like 1

Share this post


Link to post
Share on other sites

  • 7 months later...

Hi there, everyone

 

Has anybody needed to dynamically force SSL?

 

 

I consider overiding FrontController class:

if (isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], 'facebook') !== false)
    $this->ssl = true;

But it didn't work.

Maybe the wrong function... or maybe override Link class...

 

Any ideas?

 

It worked overriding getBaseLink function in Link Class.

But links are still redirecting to non-ssl pages... :(

Share this post


Link to post
Share on other sites

  • 2 weeks later...

it does

6PPuKgq.png

I'm using 1.5.6.2 on one of my sites and just tried this.. looks like everything works EXCEPT the categories.. they create a "The page isn't redirecting properly"  an indefinite redirect loop.. any ideas on why this is happening to the category pages?  URL rewriting is on.

 

Thanks

Share this post


Link to post
Share on other sites

  • 6 months later...
  • 6 months later...
  • 1 year later...

Hey, 

 

We had a similar issue after enabling ssl for prestahop. The only thing that helped is disabling and then re-enabling HTTPS via prestashop admin area as intructioned here.

 

 

Hi,

 

After I change all the necessary files and settings our site does move over to SSL but the issue we have now is everytime we have a customer access their details or try to add a product to the shopping car, we get a 'technical error'

 

Any solutions please?

 

technical%20error_zpsix2ny84h.jpg

Edited by dominicg (see edit history)

Share this post


Link to post
Share on other sites

  • 2 weeks later...

yes it's definitely annoying mainly because new feature in all modern browsers. this crappy feature blocks all unsecured connections while you're browsing secured pages. it mean that all ajax queries will not work, why? because prestashop automatically redirects from ssl to non-ssl for pages different than login / authentication. 

 

all modules with ajax queries don't work then  :(

Brother i have seen you are very helpful member to this forum :* :* thanks alot for that, i am new here, i have a website, my admin address is www.mydomain.com/admin222   but i want to change it to www.mydomain.com/designer123.

can you help me with step by step process that how i can do it??

and can you tell me that how can i make my site/store from being hacked???

Edited by CreativeSign (see edit history)

Share this post


Link to post
Share on other sites

  • 2 months later...

Hello,

if I insert code in my .htaccess:

 

RewriteEngine On
% RewriteCond {} SERVER_PORT 80
RewriteRule ^ (. *) $ Https://www.example.com/$1 [R, L]

 

(example is my domain, of course)

 

my website doesn't work. Is there something I need to change?

 

My .htaccess is:

# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums

<IfModule mod_rewrite.c>
<IfModule mod_env.c>
SetEnv HTTP_MOD_REWRITE On
</IfModule>

RewriteEngine On





#Domain: www.universaltuning.it
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api$ api/ [L]

RewriteRule ^api/(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]

# Images
RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L]
RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L]
RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L]
RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L]
# AlphaImageLoader for IE and fancybox
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]

# Dispatcher
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L]
</IfModule>

AddType application/vnd.ms-fontobject .eot
AddType font/ttf .ttf
AddType font/otf .otf
AddType application/x-font-woff .woff
<IfModule mod_headers.c>
	<FilesMatch "\.(ttf|ttc|otf|eot|woff|svg)$">
		Header add Access-Control-Allow-Origin "*"
	</FilesMatch>
</IfModule>

<IfModule mod_expires.c>
	ExpiresActive On
	ExpiresByType image/gif "access plus 1 month"
	ExpiresByType image/jpeg "access plus 1 month"
	ExpiresByType image/png "access plus 1 month"
	ExpiresByType text/css "access plus 1 week"
	ExpiresByType text/javascript "access plus 1 week"
	ExpiresByType application/javascript "access plus 1 week"
	ExpiresByType application/x-javascript "access plus 1 week"
	ExpiresByType image/x-icon "access plus 1 year"
	ExpiresByType image/svg+xml "access plus 1 year"
	ExpiresByType image/vnd.microsoft.icon "access plus 1 year"
	ExpiresByType application/font-woff "access plus 1 year"
	ExpiresByType application/x-font-woff "access plus 1 year"
	ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
	ExpiresByType font/opentype "access plus 1 year"
	ExpiresByType font/ttf "access plus 1 year"
	ExpiresByType font/otf "access plus 1 year"
	ExpiresByType application/x-font-ttf "access plus 1 year"
	ExpiresByType application/x-font-otf "access plus 1 year"
</IfModule>

<IfModule mod_headers.c>
	Header unset Etag
</IfModule>
FileETag none
<IfModule mod_deflate.c>
	<IfModule mod_filter.c>
		AddOutputFilterByType DEFLATE text/html text/css text/javascript application/javascript application/x-javascript font/ttf application/x-font-ttf font/otf application/x-font-otf font/opentype
	</IfModule>
</IfModule>

#If rewrite mod isn't enabled
ErrorDocument 404 /index.php?controller=404



# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again

Share this post


Link to post
Share on other sites

  • 1 month later...

I'm using prestashop version 1.5.6.2. i want to change my front office url http to https. How to change in my all front office page like as https and I dont know any idea about it. So please help anyone.

Share this post


Link to post
Share on other sites

  • 1 month later...

Hello,

 

You can try our module, and you don't need to be technical at all, it makes everything fast and smooth.

 

https://addons.prestashop.com/en/website-security-access/26745-one-click-ssl-lets-encrypt.html

 

No matter what side you are on (merchant or customer), a good online experience tends to involve a trusted third party and good encryption.
 
Sometimes, migrating from HTTP to HTTPS can be tricky and things might not work as planned, so, One Click SSL module helps the webmaster to go through all that and save time.
 
Using a SSL certificate from Let’s Encrypt increases user's trust in your website and customers feel confident in making purchases.
 
Your online store's SEO will improve, by receiving a small ranking boosts on search engines (especially on Google)
  • Like 1

Share this post


Link to post
Share on other sites

 Share

×
×
  • Create New...

Important Information

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