Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • pla

    (@pla)

    i found a solution:

    if you want to be able to run wordpress with different dynamic urls (aliases) linking to the same wordpress homedir, you can create a plugin with this function:

    function ml_clean_siteurl($url) {
    	$url="https://".$_SERVER[HTTP_HOST];
    	return $url;
    }
    add_filter('option_siteurl', 'ml_clean_siteurl');

    it tells wordpress to override the “siteurl” setting for internal links with the real server url.

    however, you should only do that if you’re using additional plugins to seperate content for each alias (e.g. different languages on different subdomains), otherwise google will see duplicate content (bad for ranking).

    pla

    (@pla)

    hi,

    i have the same problem.
    something that kind of works, is to modify the mysql options entry for “home” directory, when you use “/” all links are relative.
    but i got a problem with the admin area, some submissions lead to a 404 that way.

    what i’m trying now is writing a plugin hook to change the rendered absolute path based on my real server url.

    if you had any success please let me know.

    cheers, marc

Viewing 2 replies - 1 through 2 (of 2 total)