Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3847950
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T16:37:45+00:00 2026-05-19T16:37:45+00:00

My website is running on Kohana v3, and I have set up customized error

  • 0

My website is running on Kohana v3, and I have set up customized error page like below in bootstrap.php

try
{
    // Attempt to execute the response
    $request->execute();
}
catch (Exception $e)
{ 
      .... error page re-direct.
}

It works fine with 404 error.

I also have some folders that cannot be directly accessed but they have to be located under the www root. I put the .htaccess to protect these folders

# nobody can access this folder from Browser
Deny from all

When user type in the URL in the browser to access files under this folder, an Apache 403 error will be shown in plain text like this:

Forbidden

You don’t have permission to access /private_folder on this server.

I want to customize this error and handle it in Kohana. However, I find that Apache fully controls the 403 error, and does not even call the index.php under this situation.

Any idea to solve it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T16:37:46+00:00Added an answer on May 19, 2026 at 4:37 pm

    Instead of using .htaccess to lock that area down, you could do it in code. PHP’s header function could be used to send the 403 status.

    Another approach would be to set up a custom error document for 403 errors in Apache, and point this at a script to handle the error. Refer to the ErrorDocument documentation on how to do this, but it would be something along these lines:

    ErrorDocument 403 /custom_403_handler.php
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a website running in PHP and I have a page (say confirm.php)
I have a website running on a google app engine. Like any website these
I have a main website running on AppEngine. It's on a subdomain like main.example.com
I have a website running on the root folder of my host /index.php I
I have an ASP.net website running under IIS6. In one .aspx page the user
Here is my problem: I have a website running on IIS 7 + PHP
I currently have an entire website running on PHP & GET variables. My links
I have a simple php driven website running and I'm trying to figure out
I have an existing website running on IIS6 that has only static HTML pages.
I have a website running now. I have to implement some logging routines as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.