Title: pla's Replies | WordPress.org

---

# pla

  [  ](https://wordpress.org/support/users/pla/)

 *   [Profile](https://wordpress.org/support/users/pla/)
 *   [Topics Started](https://wordpress.org/support/users/pla/topics/)
 *   [Replies Created](https://wordpress.org/support/users/pla/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/pla/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/pla/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/pla/engagements/)
 *   [Favorites](https://wordpress.org/support/users/pla/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [Dynamic wordpress base URL for hostname](https://wordpress.org/support/topic/dynamic-wordpress-base-url-for-hostname/)
 *  [pla](https://wordpress.org/support/users/pla/)
 * (@pla)
 * [19 years, 1 month ago](https://wordpress.org/support/topic/dynamic-wordpress-base-url-for-hostname/#post-525665)
 * 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="http://".$_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).
 *   Forum: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [Dynamic wordpress base URL for hostname](https://wordpress.org/support/topic/dynamic-wordpress-base-url-for-hostname/)
 *  [pla](https://wordpress.org/support/users/pla/)
 * (@pla)
 * [19 years, 1 month ago](https://wordpress.org/support/topic/dynamic-wordpress-base-url-for-hostname/#post-525663)
 * 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)