Add HTTPS support, fixes #1372

git-svn-id: http://svn.automattic.com/wordpress/trunk@3041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
matt
2005-11-11 01:21:28 +00:00
parent 7c20f40c39
commit 41775561d5
5 changed files with 12 additions and 9 deletions

View File

@@ -150,7 +150,8 @@ CREATE TABLE $wpdb->usermeta (
function populate_options() {
global $wpdb;
$guessurl = preg_replace('|/wp-admin/.*|i', '', 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
$schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://';
$guessurl = preg_replace('|/wp-admin/.*|i', '', $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
add_option('siteurl', $guessurl, __('WordPress web address'));
add_option('blogname', __('My Weblog'), __('Blog title'));
add_option('blogdescription', __('Just another WordPress weblog'), __('Short tagline'));