Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 03:17:36 AM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
155533 Posts in 21713 Topics by 7739 Members
Latest Member: audillino
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: How to create 1 page with SSL [SOLVED]  (Read 2028 times)
Boudi
Addon Team

Offline Offline

Posts: 816



WWW
« on: January 29, 2010, 01:38:34 PM »

Hi,

Were in the final stage of a brandnew WB site with an online iDeal payment module. Therefore the client wishes a SSL. The problem that I'm facing is that you have to SSL the whole website. Parts seems not possible.

This is of course not good for the loading time and ranking in search engines.

So my question is: How can I secure only 1 page? Do I have to place this unique url into the config file? If so, how?

Boudi

(PS: I saw this topic before on this forum but was posted 5 years ago and did not gave a solution back then)

« Last Edit: November 18, 2011, 01:21:22 PM by Boudi » Logged

...:: Bake the Unbakable ::...
crnogorac081
AddOn Development
*
Offline Offline

Posts: 1706



« Reply #1 on: January 29, 2010, 02:26:14 PM »

Hi Boudi,

I hope someone more experienced will be able to give you exact answer, but under my opinion it is not possible. For example if you have WB_URL var stored in config.file , it is http and hot https, so if a page uses this var, the SSL conection will not be opened... Unless there is some other way to override this..

Just crossed my mind---> For example, if you create configHTTPS.php with same DB data but different WB_URL and then use include/require (../../../configHTTPS.php) in your module..

just my idea..Smiley hope it helps
« Last Edit: January 29, 2010, 02:31:48 PM by crnogorac081 » Logged

Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
kweitzel
Forum administrator
*****
Offline Offline

Posts: 6975


WWW
« Reply #2 on: January 29, 2010, 03:04:19 PM »

Exactly, the way WB was written, it is not possible to use SSL without issues at all.

cheers

Klaus
Logged

WebsiteBaker Org e.V. - for WebsiteBaker

Boudi
Addon Team

Offline Offline

Posts: 816



WWW
« Reply #3 on: January 29, 2010, 03:53:39 PM »

Thank you both for your comments.

@ crnogorac081;

Tried your thing but no luck.

Another thing I did was to download the DB, searched for the specific page url and changed the http:// into https:// and replace the entire database. Sounds very logic to me but this too did not work. Even though in the DB the specific url says https:// it still does http:// on the Internet so no luck either. Sad

Wrapping doesn't do the trick either. Like Klaus said that there is no way...but I still hope there is.

Boudi
Logged

...:: Bake the Unbakable ::...
crnogorac081
AddOn Development
*
Offline Offline

Posts: 1706



« Reply #4 on: January 29, 2010, 04:06:41 PM »

ty to replace WB_URL in config file to https (for all links)

Check do you have ssl suported and enabled on your server for your account ?
Logged

Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
Boudi
Addon Team

Offline Offline

Posts: 816



WWW
« Reply #5 on: January 29, 2010, 04:14:17 PM »

Yes, that was no problem before my question. SSL is enabled for this website and to put the entire website under SSL is no problem. I only need 1 page so therefore I tried to change the specific url in the DB but no luck Smiley

Logged

...:: Bake the Unbakable ::...
chio
WebsiteBaker Org e.V.

Offline Offline

Posts: 2264


« Reply #6 on: January 29, 2010, 05:34:22 PM »

I dont know anything about ssl, but maybe a try:

Make that one page hidden.
Make a menue-link to this page with https://..

You can move a single access-file out of the pages-directory to any other (to the root also), just correct the paths.
Code:
<?php
$page_id 
22//the real page_id
require("config.php");
require(
index.php");
?>
Logged

*weg*
Boudi
Addon Team

Offline Offline

Posts: 816



WWW
« Reply #7 on: January 29, 2010, 06:44:25 PM »

Hi Chio,

Thnq for thinking with us.

Your first solution did do the trick!!!..............only in Firefox. In Internet Explorer it doesn't work. So bummer!
Your other option I didn't get it to work. May be someone else?

Thnx again.

Boudi
« Last Edit: January 31, 2010, 12:27:36 PM by Boudi » Logged

...:: Bake the Unbakable ::...
Boudi
Addon Team

Offline Offline

Posts: 816



WWW
« Reply #8 on: January 31, 2010, 01:30:07 PM »

Update:

Inserting the code:
Code:
<?php if($_SERVER['SERVER_PORT'] != '443') { header('Location: https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']); exit(); } ?>
on top of the index.php does work fine to make a single page SSL.

This forces the page to be secure. Even if some paths are not https, the url itself is SSL. This works fine under Firefox and Chrome.

But...IE f***s it up as usual. So my question stays open how to SSL a single page within WB. I'm aware that that the current WB makes it (almost?) impossible but I think this is just one of those things that is important enough not to ignore in (future) WB versions.

Boudi
Logged

...:: Bake the Unbakable ::...
Argos
Moderator
**
Offline Offline

Posts: 2161


WWW
« Reply #9 on: July 27, 2011, 12:07:20 PM »

OK, here's what I did. It seems to work fine.

I want to make my contactform secure. It is created at
http://www.mydomain.com/wb/contact/webform.php

But I want to have it at:
https://www.mydomain.com/wb/contact/webform.php

1. I did all the stuff on my hosting to create a certificate, and modified DNS to point to a dedicated IP, needed for SSL.
2.  Then I added to my htaccess file:
Code:
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^mydomain.com [nc]
rewriterule ^(.*)$ http://www.mydomain.com/$1 [r=301,nc]
 
rewritecond %{SERVER_PORT} !^443$
rewriterule ^wb/contact/webform\.php(.*)$ https://www.mydomain.com/wb/contact/webform.php$1 [r=301]

That's it. When you go to the webform it automatically redirects to the secure page. It his a correct setup, or is it a false positive?

EDIT: Hm.. I think I miss something, because I don't see the lock icon in my browser bar, although the url starts with https and the certificate works allright....
« Last Edit: July 27, 2011, 04:41:17 PM by Argos » Logged

Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase: http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
Boudi
Addon Team

Offline Offline

Posts: 816



WWW
« Reply #10 on: November 16, 2011, 11:51:43 AM »

Thnx for your answer.

In first....it seems to work. But: when you have several bakery pages...then what to do?

Boudi
Logged

...:: Bake the Unbakable ::...
Argos
Moderator
**
Offline Offline

Posts: 2161


WWW
« Reply #11 on: November 16, 2011, 11:56:19 AM »

In first....it seems to work. But: when you have several bakery pages...then what to do?

Just add more lines like
rewriterule ^wb/contact/webform\.php(.*)$ https://www.mydomain.com/wb/contact/webform.php$1 [r=301]

But beware, I still don't know if this is a proper setup... It seems to work, but I'm not 100% sure.
Logged

Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase: http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
Boudi
Addon Team

Offline Offline

Posts: 816



WWW
« Reply #12 on: November 16, 2011, 12:04:56 PM »

Thnx.

Well What I get is a warning that this page is run over a secure line but the correct certificate isn't installed yet (which is correct because I haven't set up one yet). So the notifications seems formilliar and correct.

I will puzzle this out and come back with this. Thnx.

UPDATE: There's a working solution. As soon as the website is online I'll provide you wìth more detailed information!



« Last Edit: November 18, 2011, 10:58:53 AM by Boudi » Logged

...:: Bake the Unbakable ::...
Boudi
Addon Team

Offline Offline

Posts: 816



WWW
« Reply #13 on: November 18, 2011, 01:20:53 PM »

SOLVED! I want to thank Argos for taking the time in this.

Ruud helped me out and he has a tutorial online on his new website here:

http://www.dev4me.nl/modules-snippets/opensource/webshop-ssl/

Great stuff! Taking WB on another higher level.

When the new build website is online I will put it on the showcase with the SSL information in it.


Logged

...:: Bake the Unbakable ::...
Argos
Moderator
**
Offline Offline

Posts: 2161


WWW
« Reply #14 on: November 18, 2011, 01:24:28 PM »

Nice!  grin
Logged

Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase: http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
Sokhim Sim

Offline Offline

Posts: 67



« Reply #15 on: December 21, 2011, 02:35:17 PM »

Hi,

Anybody can advice how to make https work with website? need to contact hosting provider got get SSL work?

I have change from http to https but my page not working.

Please advice,

thanks
Logged
Boudi
Addon Team

Offline Offline

Posts: 816



WWW
« Reply #16 on: December 21, 2011, 02:37:48 PM »

You need an SSL certificate. The better hosting companies sell these certificates so ask yours.

Boudi
Logged

...:: Bake the Unbakable ::...
Sokhim Sim

Offline Offline

Posts: 67



« Reply #17 on: December 22, 2011, 02:53:23 AM »

Thanks for your reply back, so have any opensource or free SSL Certificate?

Thanks  rolleyes
Logged
Boudi
Addon Team

Offline Offline

Posts: 816



WWW
« Reply #18 on: December 22, 2011, 09:06:37 AM »

No. Costs money every year. Your hoster has them I guess. We sell them too but then you need to host on our servers.

Boudi
Logged

...:: Bake the Unbakable ::...
kweitzel
Forum administrator
*****
Offline Offline

Posts: 6975


WWW
« Reply #19 on: December 22, 2011, 09:50:41 AM »

Boudi is not entirely right in this matter. CACert offers certificates free of charge.

cheers

Klaus
Logged

WebsiteBaker Org e.V. - for WebsiteBaker

Boudi
Addon Team

Offline Offline

Posts: 816



WWW
« Reply #20 on: December 22, 2011, 11:58:58 AM »

@ Klaus:

Quote
Please note a general limitation is that, unlike long-time players like Verisign, CAcert's root certificate is not included by default in mainstream browsers, email clients, etc. This means people to whom you send encrypted email, or users who visit your SSL-enabled web server, will first have to import CAcert's root certificate, or they will have to agree to pop-up security warnings (which may look a little scary to non-techy users).
Logged

...:: Bake the Unbakable ::...
kweitzel
Forum administrator
*****
Offline Offline

Posts: 6975


WWW
« Reply #21 on: December 22, 2011, 01:25:15 PM »

Boudi, I know, but there are talks with the browser manufacturers to get the root certificate included. Anyway, with the high profile root CA hacks this year, I am not even sure if their certificates are worth the money you pay for them Wink

I trust CA Cert already for some years and on several sites which would otherwise be running with self signed certificates (the worst option) and had no issue with them at all. I have to admit though, that I have only used them on backend authentication services and not e-commerce sites. The e-commerce sites I did always had enough funds to buy a certificate from the big players.

cheers

Klaus
Logged

WebsiteBaker Org e.V. - for WebsiteBaker

Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!