Jump to content

SSL is activated. However, your IP is allowed to enter unsecure mode for maintenance or local IP iss


bksmartit

Recommended Posts

 

 

I found how to auto redirect admin to https:// by adding/changing code in .htaccess from here https://www.prestashop.com/forums/topic/123442-auto-redirect-admin-to-https/

 

This command

RewriteCond %{http_host} ^yourdomain.com/your-admin [nc]
RewriteRule ^(.*)$ https://www.yourdomain.com/your-admin/$1 [r=301,nc]

 

so it mean I need to use (I use prestahop.com as example site only).

RewriteCond %{http_host} ^prestashop.com/administrator [nc]
RewriteRule ^(.*)$ https://www.prestashop.com/administrator/$1 [r=301,nc]

 

 

but where should I add/change to make this working in here below?

 

# ~~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.pakawikids.com
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api$ api/ [L]

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

# AlphaImageLoader for IE and fancybox
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [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>

 

Please I need help here.

 

Thank you

 

Link to comment
Share on other sites

I don't know, I did this before as you said to enable SSL in your back office Preferences page. But I tested again just now and it works for me this time. Not sure why it didn't before? I think I had IP address exception in maintenance settings?

Link to comment
Share on other sites

  • 2 months later...

Hi,

 

if you have SSL enabled and go to your login page without SSL prestashop just tells you that SSL is normally active but since you're the website owner (ip registered in maintenance mode) you can proceed.

 

Are you trying to force SSL on the Login page? One Solution would be: You could just update your bookmark and that would solve lots too.

 

Or this code will force SSL. Place it in your admin folder. I had to do a print screen as i could not post it here.

post-1027252-0-67166600-1477308402_thumb.jpg

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

Thank you for your answer... I followed instructions and I get "server internal error" message.

Maybe I did somethig wrong?
Cause I interpreted your " Or this code will force SSL. Place it in your admin folder..." as if I were to create an htaccess file inside the admin folder of the site and not within the htaccess in the root folder

THEN i pasted the code into htaccess file in the root folder. Got server error on bot site front page and back office login page

Is there a way to change the site status so that I will be able to login?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...