• Resolved apropos

    (@apropos)


    I have setup a blog at work to use to replace our old intranet. In order to completely move from the old Intranet to the new blog, I have to add all of our internal links.

    I keep running into this problem that WordPress will not allow you to add a file:// instead of https://. If you do add the File:// you get the http appended to the front of the file://

    Is there a way to keep WordPress from adding this?

    Thanks,

    Apropos

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    Edit wp-includes/formatting.php.

    Find this line:
    $protocols = array('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet');

    Add ‘file’ to that array and then it will be allowed.

    Thread Starter apropos

    (@apropos)

    Otto42,

    Thank you so much, that fixed it!

    Hey guys,

    this seems to work for me as well though WP is eliminating the space in my windows filenames…any idea where this is in the code so i can get rid of it?

    many thanks!

    got it…

    you have to comment out the below line in function clean_url in formatting.php

    //$url = preg_replace(‘|[^a-z0-9-~+_.?#=!&;,/:%@$*\'()\\x80-\\xff]|i’, ”, $url);

    if you actually know php (unlike me–i use to program about 10 years ago)…there’s probably a better way to do this but this works!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Blogroll hack’ is closed to new replies.