homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

.htaccess Error Documents
From a subdomain

 10:01 pm on Apr 3, 2003 (gmt 0)

My web host has a very nice setup where if you want to create a subdomain you create a directory under your web root (/var/www/html) with the full name of the subdomain (sub.domain.com).

Now I'm trying to use custom error documents that do not reside in the sub domain directory itself but in the web root.

Any ideas how I can get this too work?



 4:49 pm on Apr 6, 2003 (gmt 0)

Use the ErrorDocument [httpd.apache.org] directive.


 5:22 pm on Apr 6, 2003 (gmt 0)

Helpful but the only viable option is using a full URL which isn't really a great idea in general and doesn't work for 401 errors.

I'll look into the matter further.


 7:59 pm on Apr 6, 2003 (gmt 0)


How about defining the errordocuments as if they existed in the subdomain's root, and then defining the error document as a symbolic link back to the site root directory? This way, you're working using a file-system view instead of a URL view, so you don't need any external redirects (which mess up the HTTP response codes).



 8:16 pm on Apr 6, 2003 (gmt 0)

That would work nicely. Now how do I create a symlink through FTP or on a Windows box? I don't think it's possible with the limited resources I have.


 8:24 pm on Apr 6, 2003 (gmt 0)


Can you use Telnet to log in?

If not, maybe you could create them as files, and ask your host's tech support to change them to symlinks for you. (The only advantage of creating them as files is to act as placeholders for the symlinks so that the techs can see they are in the right directory - might save some back-and-forth with them.)



 8:31 pm on Apr 6, 2003 (gmt 0)

Hmm... I'll have to look into that. Thanks again.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved