• I uploaded WordPress on my host’s server, and tried creating a new folder in my ftp to store images I’d like to direct link from other web sites like Myspace.com. I created the images folder and added some images, and tried to link to them, but the images don’t show up and instead returns a 404 error page from my wordpress site. I figure there is some kind of function that prevents direct linking of images or something, and I’d like to remove it or change it.

    Does anyone know how to correct this problem? Thanks for the help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’m set up a lot of blogs just as your are attempting. The images folder has to be accessible be the webserver (not really a wordpress thing) and most likely yours isn’t or the permissions on the folder and possibly on the file have to all allow access.

    What’s the folder name and what’s the url you use in your img tags to get to a file?

    On many servers, .htaccess (basically a configuration file for the Apache web server) is configured to disallow hotlinking from remote sites. This is often accomplished through the use of rewrite conditions and rules in this file.

    One thing you can try, is creating a file called .htaccess in the directory with the images, and adding the following code to it:

    RewriteEngine off

    Keep in mind that if you are doing this in Windows, it will not let you create a file starting with a period, so you can call it htaccess.txt (for example), upload it to your server, and then rename to .htaccess

    One final note is that files starting with a period are considered hidden on most web servers, and after you rename it, you may not see it anymore depending on the settings in your FTP client.

    There are other methods to implement hotlinking protection of course, but this may work for you. If not, you could contact your host. 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Direct Image linking on server?’ is closed to new replies.