homepage Welcome to WebmasterWorld Guest from 54.205.52.110
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
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
Oaf357




msg:1499028
 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?

 

DaveAtIFG




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

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

Oaf357




msg:1499030
 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.

jdMorgan




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

Oaf357,

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).

Jim

Oaf357




msg:1499032
 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.

jdMorgan




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

Hmmm...

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.)

Jim

Oaf357




msg:1499034
 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