1 (edited by lluixhi 2014-02-07 19:50)

Topic: HTTPS redirect after login

I've just set up a punbb forum, and I am unable to log into my administrator account.
When I log in, it redirects me to my website with https in front of it, but i don't have an secured site. How do I either
A. Prevent the redirect
B. Create a secured website for punbb
C. Redirect from secured to unsecured so the login still works
To fix this?

I am on Ubuntu Server 13.04 with nginx 1.2.6, php 5.4.9, mysql 5.5.3, and punbb 1.4.2

Re: HTTPS redirect after login

Sorry for late answer, but maybe someone will find it useful.

I think the problem is not in the punbb, but in your nginx settings. Nginix redirects all pages to https which contains "login" in url. You have to investigate your nginx configuration file carefully. In my opinion you should generate a certificate and host your website in both protocols (your website will be more secure).

If you manipulate a variable base_url, you may host your forum in both http and https. Of course you have to change localhost to your domain smile

// only http support
//$base_url = 'http://localhost/punbb';

// http and https support
$protocol = (!isset($_SERVER['HTTPS']) || strtolower($_SERVER['HTTPS']) == 'off') ? 'http' : 'https';
$base_url = $protocol.'://localhost/punbb';
If you want to contact me quickly - send e-mail, not PM.
<?php $t='<?php $t=%c%s%c; printf($t,39,$t,39,10);%c'; printf($t,39,$t,39,10);