Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

How to force httpS on a static page?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-30-2011, 09:28 AM
 
ps4all ps4all is offline
 

Member
  
Join Date: Oct 2008
Posts: 14
 

Default 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.
__________________
X-Cart DB Version: 4.4.3 GOLD
Reply With Quote
  #2  
Old 10-30-2011, 12:50 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default 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
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote

The following user thanks cflsystems for this useful post:
ps4all (10-30-2011)
  #3  
Old 10-30-2011, 01:01 PM
 
ps4all ps4all is offline
 

Member
  
Join Date: Oct 2008
Posts: 14
 

Default 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.
__________________
X-Cart DB Version: 4.4.3 GOLD
Reply With Quote
  #4  
Old 10-30-2011, 01:03 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: How to force httpS on a static page?

Don't use the .html - use the dynamic url, pages.php and pageid=#
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote

The following user thanks cflsystems for this useful post:
ps4all (10-30-2011)
  #5  
Old 10-30-2011, 01:09 PM
 
ps4all ps4all is offline
 

Member
  
Join Date: Oct 2008
Posts: 14
 

Default Re: How to force httpS on a static page?

This is very great!
Thanks...
__________________
X-Cart DB Version: 4.4.3 GOLD
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:04 PM.

   

 
X-Cart forums © 2001-2020