FutureQuest, Inc. FutureQuest, Inc. FutureQuest, Inc.
File paths and subdomains ../ doesn't work?
Posted on 27 January 2004 10:06 AM
Question:

You recently set up a bunch of sub domains for example.com. When I type in the subdomain, the page acts differently than when I type in the actual directory it points to.

For instance:
http://entrance.example.com/
points to
http://example.com/entrance/

You'll notice that the sub-domain won't recognize the ../ code in the directory. Can you please explain? It was working fine a couple days ago.

Answer:

When you visit http://entrance.example.com/ you are in the root directory for that (sub)domain. Trying to use "../" will not work, as you are already in the root directory.

You cannot use relative paths when there are two different levels with which you can reach the same site, for this very reason.