Support » Fixing WordPress » make all paths relative

  • I have a client who wants their entire site secure with ssl – problem is that so many of the plugins and other wordpress functions call absolute paths to verious things… the main area i see this at is in the wp_head function. I figure writing a hook to find and replace the instances of the domain is the best way to solve this issue, but i am not very good at writing them. This is what i have so far, and i know its not working, but if someone can help me with the code it would be greatly appriciated.

    function make_relative($string) {
         return str_replace(get_bloginfo('url'),$GLOBALS[rootaccess],$string);
    }
    apply_filters("wp_head","make_relative");

    The rootaccess global is created by a simple count of / in the request_uri so i know it works fine… its applying it to the contents of the wp_head function that is giving me trouble.

    thanks in advance for the help

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘make all paths relative’ is closed to new replies.