Forum Moderators: phranque

Message Too Old, No Replies

403 on add-on domain showing subdomain path

         

hy001

11:14 pm on Feb 26, 2004 (gmt 0)

10+ Year Member



I'm posting this in here as I'm guessing the answer lies with redirects or somesuch and .htacess, but my grasp of it its capabilities (and programming!) is pretty poor.

Here's my problem.

I have two domains.

A main domain: www.foo.com
And an add-on domain: www.sub.com (which can also be accessed by sub.foo.com)

Going to a directory by typing in www.sub.com/path and not using a trailing / is showing the url as sub.foo.com/path when both the 403 loads or I put an index.htm page in that directory.

Is there a way I can get the 403 url to show as www.sub.com/path?

Any help would be greatly appreciated.

jdMorgan

11:49 pm on Feb 26, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



hy001,

Welcome to WebmasterWorld [webmasterworld.com]!

What does your ErrorDocument directive look like?

It should be something like this:


ErrorDocument 403 /custom403.html

If you have something like this:

ErrorDocument 403 http://www.domain.com/custom403.html

then you'll have problems.

Otherwise, the problem is most likely with your URL rewrite used to associate the subdomain with the subdirectory. You can "track" your server's handling of the 403 by using the Server Headers Checker [webmasterworld.com]. It is likely you're going to find a 302 redirect response when a 403 is expected.

Jim

hy001

4:52 am on Feb 27, 2004 (gmt 0)

10+ Year Member



Thanks very much for the help, Jim. I checked the server headers and you were right. It was a problem with the 302. I managed to fix problem I was having.

Thanks again!