Jump to content

Recommended Posts

To enable HTTPS in all pages of your prestashop website follow this

 

1. find your .htaccess file (usually in the root folder)

 

2. open the file ---- >FInd for "RewriteEngine on" if its off make it on

 

3. Under this write this below code

 

RewriteCond %{SERVER_PORT} 80

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

 

4. Save and upload the file to respective directory

 

 

NOTE: Extra rewriteRule may be present under "RewriteEngine on" Ignore do not modify until you understand it fully.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

To enable HTTPS in all pages of your prestashop website follow this

 

1. find your .htaccess file (usually in the root folder)

 

2. open the file ---- >FInd for "RewriteEngine on" if its off make it on

 

3. Under this write this below code

 

RewriteCond %{SERVER_PORT} 80

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

 

4. Save and upload the file to respective directory

 

 

NOTE: Extra rewriteRule may be present under "RewriteEngine on" Ignore do not modify until you understand it fully.

 

 

Hi vekia,

 

you can keep custom .htaccess after regeneration in 1.5 if done correctly:

http://www.prestasho...ustom-htaccess/

 

for 1.4 you can use the back office to set custom directives so they are preserved across a regenerate

 

Hi there, thanks for your guys help,i finally all SSL was enable on my prestashop page. However there was another problem occured.

 

some of my site page cant be access as it says "Not Found EROR 404"

 

here are pat of my htaccess :

 

<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.yoursite.com.my/$1 [R,L]

 

Is there any mistake i have done?

 

My presta 1.4.5.0

Link to comment
Share on other sites

Try activating rewritebase for each url paths....example below,, hope this should help...

 

# Activation of the URL Rewriting

Options +FollowSymlinks

RewriteEngine On

 

# RewriteBase equivalent - Production

RewriteCond %{HTTP_HOST} !^localhost$

RewriteRule . - [E=REWRITEBASE:/production/path/]

 

# RewriteBase equivalent - Development

RewriteCond %{HTTP_HOST} ^localhost$

RewriteRule . - [E=REWRITEBASE:/development/path/]

 

# Rewriting

RewriteRule ^(.*)$ %{ENV:REWRITEBASE}index.php?page=$1 [L]

Edited by pratyushraj2225 (see edit history)
Link to comment
Share on other sites

Where to put that actually?

 

Im using litespeed server by stablehost.

 

And i have test it on every position, and its still make no changes.

 

Oh yea, i want to correct my old comment, its not just Category and products,

 

everything other than main page and back office, all become Error 404.

 

Can i ask, whenever im clicking other pages on my site, why it became http instead https?

 

Lets say, when im accessing my web,

 

https://store.yoursite.com.my

 

then i want to go to antivirus products category, it suddenly changes it self like being force to

 

http://store.yoursite.com.my/antivirus

 

even when i put https:// manually like this "https://store.yoursite.com.my/antivirus" it will automatically remove "s" and become only http.

 

is this normal?

 

Im sorry for asking so many question due to im just a newbie

Link to comment
Share on other sites

the 's' is replaced because the https is not activated in that page,

 

In many cases, you can also just add these lines vbelow to a file named .htaccess in the folder that you want to redirect http to https.

RewriteEngine On

RewriteCond %{HTTPS} off

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

 

remember add .htaccess file to each folder which you want to be https.

 

You can also redirect a single page from http to https in server by using this in your configuration file or .htaccess file:

RewriteEngine On

RewriteRule ^apache-redirect-http-to-https\.html$ https://www.yoursite...p-to-https.html [R=301,L]

Repeat the above 2nd line for every url which you want to be https.

 

 

 

Look in your control panel for ssl and try to activate the ssl for every domain.

Edited by pratyushraj2225 (see edit history)
Link to comment
Share on other sites

Hi Thanks For your help, I finally solve this

 

I did go through some of the details your given and also found a tutorial for regenerate .htaccess file here.

 

http://mypresta.eu/en/art/basic-tutorials/how-to-regenerate-htaccess-in-prestashop-1-5.html

 

But id didnt do much help, until i found an option at backoffice>seo&Url

 

I do some test on turning on and off for these option then finally i can use the https on others page:

 

Friendly URL : YES

Ascented URL : NO

Automatically redirect to the canonical URL : NO

Disable apache multiviews : NO

Disable apache mod security : YES

 

Then finally i replacing the default Review Code

 

<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 the code With the one you given earlier:

 

<IfModule mod_rewrite.c>

RewriteEngine on

RewriteCond %{SERVER_PORT} 80

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

 

And Suddenly, Everything go smooth and every page are enables with SSL.

 

Mission Completed, thanks For your guys help :)

  • Like 1
Link to comment
Share on other sites

I do have a similar problem where I can't access any of the categories etc other than the home page. I have a test site running prestashop. The main URL is not redirected yet since we are running aspdotnetstorefront on a different server.

I encounter problems testing some modules and the navigation. One suggestion from prestashop staff was:

 

Module doesn't work as on the server there is a redirect (.htaccess file) of all requests from http://198.252.65.104/~tth/shop/

to http://theteahaus.com/shop/ without taking subcatologues, i.e.the request is sent not to http://theteahaus.com/shop/modules/producttabs/ajax.php

but to http://theteahaus.com/shop/ and it doesn't get a reply.

You need to set the redirect properly on the server.

 

I am just not sure how do properly redirect it on the server without redirecting our current site. Any suggestions?

Link to comment
Share on other sites

To enable HTTPS in all pages of your prestashop website follow this

 

1. find your .htaccess file (usually in the root folder)

 

2. open the file ---- >FInd for "RewriteEngine on" if its off make it on

 

3. Under this write this below code

 

RewriteCond %{SERVER_PORT} 80

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

 

4. Save and upload the file to respective directory

 

 

NOTE: Extra rewriteRule may be present under "RewriteEngine on" Ignore do not modify until you understand it fully.

 

It doesnt work on my shop i get an error: "To many redirections" or similar cant remember now.

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

Hi there guys, now im back with a new problem;

 

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.

 

So now, after the update, i cant force the ssl on my site. hope can help

Link to comment
Share on other sites

I believe the redirect-logic using .htaccess worked more by accident than by design in older releases, and that Prestashop changed in 1.5.5 so it accidentally stopped working.

 

Changes are needed in Prestashop core to fix this, it's tracked in  http://forge.prestashop.com/browse/PSCFV-6689 but not much progress seems to be made.

 

 

Cheers, Robert.

  • Like 1
Link to comment
Share on other sites

I believe the redirect-logic using .htaccess worked more by accident than by design in older releases, and that Prestashop changed in 1.5.5 so it accidentally stopped working.

 

Changes are needed in Prestashop core to fix this, it's tracked in  http://forge.prestashop.com/browse/PSCFV-6689 but not much progress seems to be made.

 

 

Cheers, Robert.

 

Not to much i think, its stopped at 1.4.9.0, and even if i want to give it a try, its already proven there, even in an upgrade between 1.4.x.x - 1.4.9.0 its already have a BIG DIFFERENCES. So which is, logically impossible to be the same in 1.5.5.0

 

Maybe thinking on changing to ocart if these issu cant be solve

Link to comment
Share on other sites

  • 2 weeks later...

Yo tenia un problema parecido y era simplemente algunas imagenes que no estaban nombradas correctamente al subirlas y ponerles los links. Ej.- imagen de cms en vez de ponerle: https://www.miweb.x/img/x.png le ponia http.. Para averiguar esto existe una herramienta muy util que te da los resultados de lo que no esta dentro del https. Visite  http://www.whynopadlock.com/

Link to comment
Share on other sites

  • 4 months later...

i am looking to redirect a product page simply to include the category in the link. For example: www.ApostolicClothing.com/iris.html should be www.ApostolicClothing.com/skirts/iris.html

 

Hope that makes sense. I know how to change the SEO to include the category but due to our social media presence, i dont want all of our outside links to go bad. 

 

ANY HELP WOULD BE APPRECIATED. 

Link to comment
Share on other sites

  • 3 weeks later...

I am having a similar problem, please look at the attachment. If you see, there is a yellow triangle next to the icon.

 

The developer followed this thread and modified the .htaccess.

 

We are also having issues at the backend entering secured information.

 

We need to resolve this issue, any help.

 

post-766005-0-56492900-1393654384_thumb.jpg

post-766005-0-08985800-1393654386_thumb.jpg

Link to comment
Share on other sites

  • 1 month later...

I am having a similar problem, please look at the attachment. If you see, there is a yellow triangle next to the icon.

 

The developer followed this thread and modified the .htaccess.

 

We are also having issues at the backend entering secured information.

 

We need to resolve this issue, any help.

We have the same problem, any helps please?

we try to modify file .htaccess in root / but the result is the same.....any tips please?

Link to comment
Share on other sites

you see there yellow unlock because of unsecured contents.

what files are loaded without ssl ?

A lot of images, this is a report from google chrome:

"The page at 'https://www.pixelmatto.com/' was loaded over HTTPS, but displayed insecure content from 'http://www.pixelmatto.com/img/logo.jpg?1398198601': this content should also be loaded over HTTPS.

The page at 'https://www.pixelmatto.com/' was loaded over HTTPS, but displayed insecure content from 'http://www.pixelmatto.com/img/logo.jpg?1398198601': this content should also be loaded over HTTPS. (index):5
The page at 'https://www.pixelmatto.com/' was loaded over HTTPS, but displayed insecure content from 'http://www.pixelmatto.com/modules/homeslider/images/b26b5eb46cee329fcad266051decad18.jpg': this content should also be loaded over HTTPS. (index):15
The page at 'https://www.pixelmatto.com/' was loaded over HTTPS, but displayed insecure content from 'http://www.pixelmatto.com/modules/homeslider/images/2183f3f1796e4273d7bbb73857704ca3.jpg': this content should also be loaded over HTTPS. (index):15
The page at 'https://www.pixelmatto.com/' was loaded over HTTPS, but displayed insecure content from 'http://www.pixelmatto.com/modules/homeslider/images/7560d1a458c8f66c51da53fad587a555.jpg': this content should also be loaded over HTTPS. (index):15
The page at 'https://www.pixelmatto.com/' was loaded over HTTPS, but displayed insecure content from 'http://www.pixelmatto.com/modules/blockreinsurance/img/reinsurance-1-1.jpg': this content should also be loaded over HTTPS. (index):15
The page at 'https://www.pixelmatto.com/' was loaded over HTTPS, but displayed insecure content from 'http://www.pixelmatto.com/modules/blockreinsurance/img/reinsurance-2-1.jpg': this content should also be loaded over HTTPS. (index):15
The page at 'https://www.pixelmatto.com/' was loaded over HTTPS, but displayed insecure content from 'http://www.pixelmatto.com/modules/blockreinsurance/img/reinsurance-3-1.jpg': this content should also be loaded over HTTPS. (index):15
The page at 'https://www.pixelmatto.com/' was loaded over HTTPS, but displayed insecure content from 'http://www.pixelmatto.com/modules/blockreinsurance/img/reinsurance-4-1.jpg': this content should also be loaded over HTTPS. "
Link to comment
Share on other sites

  • 4 months later...
  • 11 months later...

HI  :)

 

I'm trying to fix a canonical url issue (http/https duplicates).

I was playing with your solutions to shift all product urls in https when I discovered that some misconfiguration probably creeped in somewhere.

 

I added 1 line to .htaccess :

 

RewriteEngine on
RewriteCond %{HTTP_HOST} ^mydomain$
RewriteRule ^(.*)$ https://mydomain/$1 [R,L]
RewriteRule . - [E=REWRITEBASE:/Base/]
RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]

 

It works like a charm : all urls are httpsed !

1 line was not enough though... No https product page is found on the server (+ error message).

 

SSL certificate is installed and valid.

PS configuration with Domain SSL + set to 1 for SSL.

https://mydomain/Base/ works fine as well as https://order & payment pages.

 

Why not the product pages ?

 

Any clue where to look would be GREAT !!!

Always humbly drinking your Light from above

Link to comment
Share on other sites

I can't open product pages with secured connection

it is like they do not exist at all on the server, although the url is correctly written (+ preceeded with https)

I'm not privy enough with the mechanics of PS yet to have a clue where to dig in at that point

do you see some track to follow ?

Link to comment
Share on other sites

×
×
  • Create New...