2 different 404s for 2 different areas?

M

MaggieMagill

Is it possible to have one area of a site launch 1 custom 404 & a different
area of the same site launch another, different in content, custom 404?

2 seperate areas in two different sub-directories under the main directory;
each with their own style of 404. Each reflecting the theme of the
different areas.
 
J

Jukka K. Korpela

MaggieMagill said:
Is it possible to have one area of a site launch 1 custom 404 & a
different area of the same site launch another, different in content,
custom 404?

Most probably. It depends on the server, though.
2 seperate areas in two different sub-directories under the main
directory; each with their own style of 404. Each reflecting the theme
of the different areas.

Well, the simplest way to solve the original problem is usually to put the
areas into different directories. On Apache for example, you would then
simply use different .htaccess files in the two directories, referring to
different files in the ErrorDocument directives.
 
R

Richard

Is it possible to have one area of a site launch 1 custom 404 & a
different
area of the same site launch another, different in content, custom 404?
2 seperate areas in two different sub-directories under the main
directory;
each with their own style of 404. Each reflecting the theme of the
different areas.

Why would you direct a visitor to a 404 page if the page exists?
The only reason you would need a 404 page is if the page requested does not
exist.
If need to configure certain ones though, I would think your host would be
the one to help you to set it up correctly.
 
D

Dave Patton

Most probably. It depends on the server, though.


Well, the simplest way to solve the original problem is usually to put
the areas into different directories. On Apache for example, you would
then simply use different .htaccess files in the two directories,
referring to different files in the ErrorDocument directives.

Or, on Apache, you could have a single .htaccess file in the
webserver root directory, with a single ErrorDocument directive,
and have the script handling the 404 errors(e.g. /myerrorpage.php)
present an "error page" that is suitable for your site, including
differences for different parts of the site. You can use values of
the Apache "REDIRECT_" variables to tailor your response to the error.
http://httpd.apache.org/docs/custom-error.html
 
N

Not Me

Or, on Apache, you could have a single .htaccess file in the
webserver root directory, with a single ErrorDocument directive,
and have the script handling the 404 errors(e.g. /myerrorpage.php)
present an "error page" that is suitable for your site, including
differences for different parts of the site. You can use values of
the Apache "REDIRECT_" variables to tailor your response to the error.
http://httpd.apache.org/docs/custom-error.html

Yes - it would be on Apache 1.3.33. That's the thing. From the main root
there would be many sub-dirs one of which would be a different "theme" and
content. Basically a different site but accessible only from the main
site. That sub-dir would have it's own sub-dirs under it with all things
relevant to it's "theme".

The custom 404 given to the main site would make no sense when encountered
in the pseudo-site in the sub-dir.

I had thought that a 404 directive would be generated by the server in
general without regard to what dir/sub-dir the error was encountered in;
ignoring any .htaccess params set in any other than the main root. Or at
least overrode by the main root .htaccess params.

I've linked-up the docs you pointed me to and will study them soon.

As far as .htaccess control goes - are the resulting params set further
into the dir tree; overriding or adding to the previous configs from a
parent dir? Or is that file only relevant to the dir (and children) it's
in?
 
N

Not Me

Not Me said:
Yes - it would be on Apache 1.3.33. That's the thing. From the main
root there would be many sub-dirs one of which would be a different
"theme" and content. Basically a different site but accessible only
from the main site. That sub-dir would have it's own sub-dirs under it
with all things relevant to it's "theme".

The custom 404 given to the main site would make no sense when
encountered in the pseudo-site in the sub-dir.

I had thought that a 404 directive would be generated by the server in
general without regard to what dir/sub-dir the error was encountered
in; ignoring any .htaccess params set in any other than the main root.
Or at least overrode by the main root .htaccess params.

I've linked-up the docs you pointed me to and will study them soon.

As far as .htaccess control goes - are the resulting params set
further into the dir tree; overriding or adding to the previous
configs from a parent dir? Or is that file only relevant to the dir
(and children) it's in?

Skip that last paragraph - I found the info regarding the directory
control.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top