Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // wp-config.php
- if(empty($_SERVER['HTTPS']))
- {
- ob_start('my_fix_https_links');
- function my_fix_https_links ($content)
- {
- $content = str_replace('https://' . $_SERVER['HTTP_HOST'], 'http://' . $_SERVER['HTTP_HOST'], $content);
- return $content;
- }
- }
- if(!empty($_SERVER['HTTPS']))
- {
- define('WP_PLUGIN_URL', 'https://' . $_SERVER['HTTP_HOST'] . '/wp-content/plugins');
- define('WP_CONTENT_URL', 'https://' . $_SERVER['HTTP_HOST'] . '/wp-content');
- define('WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST']);
- define('WP_URL', 'https://' . $_SERVER['HTTP_HOST']);
- define('WP_HOME', 'https://' . $_SERVER['HTTP_HOST']);
- }
- else
- {
- define('WP_PLUGIN_URL', 'http://'.$_SERVER['HTTP_HOST'].'/wp-content/plugins');
- define('WP_CONTENT_URL', 'http://'.$_SERVER['HTTP_HOST'].'/wp-content');
- define('WP_SITEURL', 'http://'.$_SERVER['HTTP_HOST']);
- define('WP_URL', 'http://'.$_SERVER['HTTP_HOST']);
- define('WP_HOME', 'http://'.$_SERVER['HTTP_HOST']);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement