Support » Plugins » Possible dangerous “hack” … change all links to be relative

  • I have an odd need to change all absolute links displayed by wordpress to relative.

    For whatever reason when I try and change blog address to “”, wp won’t let me. Same thing for wordpress address. It seems it insists on a well formed URI.
    What I’ve done is searched for all occurances of get_settings(‘home’) and “whacked” them. That is, replaced this function call with nothing.
    In all cases this call was the first in a long catenated string.

    This seems to have worked (I only touched templates-categories and templates-link files),
    but is something going to go haywire ?

    Anybody got a better idea ?

    A little sql diddy could probably change this ‘home’ variable to “nothing” … but I’m sort of retarded when it comes to that stuff.

    // BullShit
    I want to have 2 or 3 different blogs.
    One blog is the “master” blog, and displays all posts. The other blogs don’t know about the “master” blog.

    The “secondary” blogs are actually single categories of the “master”.

    This is my angle:
    I used DynDNS to set up several sub-domains for site:
    etc …
    I set up apache2 with several virtual hosts …
    though all this could probably be done with .htaccess files too …

    my biggest problem is getting all links to be displayed as relative … so that the “referer” is preserved … that is , tech.mydomain stays tech.mydomain.

Viewing 1 replies (of 1 total)
  • o.k.,

    this would have been much simpler:

    I just added the following line to the get_settings function (in file functions.php) , up at the top:

    if (‘home’ == $setting) return “”;

    this is an easy “hack” and easy to undo.

    anybody got any reason why i shouldn’t do this ?

    it appears to have made all links relative …
    all category, single-post, rss, etc ….
    all in one shebang.

Viewing 1 replies (of 1 total)
  • The topic ‘Possible dangerous “hack” … change all links to be relative’ is closed to new replies.