farjam
farjam

Reputation: 2299

Wordpress: Admin is not redirecting correctly

Here is what I have in my wp-config.php

define('WP_HOME', $_SERVER['HTTP_HOST']);
define('WP_SITEURL', $_SERVER['HTTP_HOST']); 
define('DOMAIN_CURRENT_SITE', $_SERVER['HTTP_HOST']);
define('WP_HOME', $_SERVER['HTTP_HOST']);

However, when I navigate to the admin side of my website, it does not redirect correctly and reappends the website address at the end of the URL.

This has also caused my featured images to disappear too.

Any clue what might be going on?

Upvotes: 0

Views: 256

Answers (1)

user2616876
user2616876

Reputation:

You are missing http:// in the beginning of the URL's

define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST']);
define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST']); 
define('DOMAIN_CURRENT_SITE', 'http://' . $_SERVER['HTTP_HOST']);
define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST']);

http://codex.wordpress.org/Editing_wp-config.php#WordPress_address_.28URL.29

Upvotes: 4

Related Questions