X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   How to force httpS on a static page? (https://forum.x-cart.com/showthread.php?t=61417)

ps4all 10-30-2011 09:28 AM

How to force httpS on a static page?
 
Hiya All,

I'm currently trying to build up a static page including some content from another PHP-file. After about 2 minutes the page was finished. But now I would like to secure the page with httpS ...

I have tried I 301 redirect within .htaccess to the page but it seems it goes into a loop ... seems the dispatcher.php redirects the page to a non httpS page while the .htaccess tries to redirect it up to the httpS page.

I have been trying about everything I could think of but unfortunately nothing seemed to be working.

I have also been looking around for a smarty tag which forces SSL / HTTPS but this was without luck as well.

So now the question, is there someone with a workaround or solution to have one or more pages with SSL / HTTPS security. This is really needed because it contains a login form to access directadmin, phpMyAdmin, Webmail e.g. for my customers.


Hope someone can help me out.
Thanks.

cflsystems 10-30-2011 12:50 PM

Re: How to force httpS on a static page?
 
Add your page to $https_scripts array in this
PHP Code:

if ($config['Security']['use_https_login'] == 'Y') { 

in root_of_cart/https.php

ps4all 10-30-2011 01:01 PM

Re: How to force httpS on a static page?
 
Hi,

In case of a static page, this doesn't work ?!
When I add somepagehere.html (which contains the static page within X-Cart) it still redirects right up to the non https page.

I think, this is because when a visitor visits a .html page (static within X-Cart) the dispatcher.php will be called. In this case the dispatcher.php file has to be included in the https.php file. But! When I do this, I'm quite sure the category as well other pages (products e.g.) will be redirected into https as well because these pages are requested by the dispatcher.php as well. So there must be another solution for this.

cflsystems 10-30-2011 01:03 PM

Re: How to force httpS on a static page?
 
Don't use the .html - use the dynamic url, pages.php and pageid=#

ps4all 10-30-2011 01:09 PM

Re: How to force httpS on a static page?
 
This is very great!
Thanks...


All times are GMT -8. The time now is 06:58 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.