Multiple 404 error pages

Is it possible to have a different 404 or 500 error page be shown based
on the request path? For example, any failed request that started with
“/admin” would get an error page that matched the layout of the admin
layout while any other failed request would get the standard 500 error
page.

On Tue, Oct 16, 2007 at 08:10:55PM +0200, Tim Michaud wrote:

Is it possible to have a different 404 or 500 error page be shown based
on the request path? For example, any failed request that started with
“/admin” would get an error page that matched the layout of the admin
layout while any other failed request would get the standard 500 error
page.

location / {

error_page 404 /404.html;
}

location = /404.html {

}

location /admin {

error_page 404 /admin/404.html;
}

location = /admin/404.html {

}

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs