[Suggestion] Remove or give user a way to bypass siteurl? (1 post)

  1. shazhouke
    Posted 5 years ago #

    Hi, Guys
    Here's my case.
    I am new to WP. I created my first WP blog on a local machine in LAN with DDNS. The DDNS service is not very stable, sometimes I need to access with IP addr. So here's the problem. If I set 'siteurl' to IP based url, people out side the LAN can never access the site. If it's hostname based, sometimes I got hostname resolution failure, even I am just working on the server.

    My proposal is, may be we can use $_SERVER['HTTP_HOST'] instead of 'siteurl' option when generating the pages. Because $_SERVER['HTTP_HOST'] is the address user used to reach the server, it's always reachable.

    I did some investigation.
    1. search for 'SELECT' operations on the option table
    2. replace the URL in value of 'siteurl' with $_SERVER['HTTP_HOST']
    Everything works perfectly.

    I am not sure if 'siteurl' is a MUST for any other use cases. Any idea?

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 5 years ago by shazhouke
  • This topic is not a support question
  • WordPress version: 3.1.1