Recent Topics

1 Oct 01, 2014 12:57    

Hi

Can someone point me to the correct info / documentation or explain how can I use http and https at the same time for my blogs?

I am using b2evolution 5.0.9 and 5.1.2

Thanks in advance

2 Oct 07, 2014 08:11

Hi @zebulon,

You should be clearer on what are your requirements, for example: do you want ALL your URLs being accesible in both ways http://example.com and https://example.com? (btw, this is bad for SEO, if you care about it at your sites). Do you need only selected pages to be accessible via https?

... I have to split my comment in two pieces due to forum's restrictions.

3 Oct 07, 2014 08:13

The file _basic_config.php contains a commented section right below of the $baseurl definition that may be useful in this case. For example, I tested the following and it works exactly as expected:


//$baseurl = 'http://svnexport.b2evo.local/i6/blogs/';
// Use the following if you want to use the current domain:

if( isset($_SERVER['HTTP_HOST']) )
{	// This only works if HOSt provided by webserver (i-e DOES NOT WORK IN PHP CLI MODE)
	$baseurl = ( (isset($_SERVER['HTTPS']) && ( $_SERVER['HTTPS'] != 'off' ) ) ?'https://':'http://')
							.'example.com/';
}

Of course, I just did some local test with a standard install, maybe you could have different results based in a different configuration of your sites. Also, this won't work in those collections which URL has been set to Absolute.

Please, let us know if this information is useful and addresses your needs.

Regards!

4 Oct 09, 2014 03:24

Hi @mgsolipa

I will give it a try.
Yes I wanted to test the entire site to be accessable with http and https

Thanks so far. I will let you know the outcome.


Form is loading...