Вопрос

I have an interesting question about functionality of wordpress latest version 3.8 (and all prior I believe).

I have a load of links which are relative to the "base domain" or the default domain. However unlike with usual relative URLs, wordpress means I can't have multiple default domains.

I this case (and I don't want to spam) I would like to have subduce.com and leedsweddingdj.com both pointing to the same site without it refering back to subduce.com whenever a link is clicked

Can anybody offer any thoughts/suggestions on ways round this problem?

Henry

Это было полезно?

Решение

If you update your wp-config.php file with the following code

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

You're server will take care of the rest. The only thing to note is that if you have links to either of the domains within posts and pages, you may find yourself hopping between domains.

Make a backup of your wp-config.php file before you do the above though, just in case things get weird.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top