Welcome to WebmasterWorld Guest from 107.20.34.173

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

.htaccess Error Documents

From a subdomain

     

Oaf357

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

10+ Year Member



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

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

WebmasterWorld Senior Member 10+ Year Member



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

Oaf357

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

10+ Year Member



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

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

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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

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

10+ Year Member



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

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

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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

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

10+ Year Member



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

Featured Threads

Hot Threads This Week

Hot Threads This Month