Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I created a site on a testing server on my local Windows machine, and now I wish to port it to a remote server which is Linux. Both sites running under Apache.

To create symlinks on Windows, is stopped the server, and used mklink /d source destination, and I was careful to use relative syntax - eg. ..\imgdir instead of C:\htdocs\imgdir. I don't know if that matters, but it made sense in my brain. Started the server, symlinks work fine.

However, when I upload the site with FTP, the symlinks are gone. The folders just disappear. Is this to be expected? Is there are solution?

share|improve this question
up vote 4 down vote accepted

This is expected behavior - FTP doesn't know anything about symlinks and cannot create them - it operates on regular files and directories. Even if supported, I don't really see how it will work. Windows symlinks are different from linux symlinks.

share|improve this answer
This is what I feared. Makes a cross platform testing server seem like a bad idea. Here's a weird twist though: I made up a quick test the first time I tried it. I made a directory structure like 1/2/3/4/5, and then in 5 created a symlink to ../../3. I uploaded that, and that worked: sort of. It created an infinitely recursive directory on Linux. – user1167442 Sep 8 '13 at 13:02
cross platform testing isn't bad idea in this case. using symlinks with web is a bad idea, most of the hosting providers won't allow web server to follow symlinks. – GioMac Sep 8 '13 at 13:04
use .htaccess/mod_rewrite to forward requests – GioMac Sep 8 '13 at 13:05
I think I'll just create a shell script to recreate the links. – user1167442 Sep 8 '13 at 14:07
Bad way. Use rewriting rules. Symlinks aren't available everywhere. – GioMac Sep 8 '13 at 17:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.