1

I use Kohana v=3.2 and want to access check.php that located on webroot

webroot
  modules
  application
  system
  index.php
  check.php
  .htaccess

but when I access domain.com/check.php, I found

HTTP_Exception_404 [ 404 ]: Unable to find a route to match the URI: check.php

Can anyone help so I can access the file domain.com/check.php ?

john
  • 55
  • 1
  • 1
  • 6
  • Two hints: see the routing set up in bootstrap and the .htaccess file. – MaGnetas Dec 15 '13 at 09:23
  • @MaGnetas : Could you help me the example, please – john Dec 15 '13 at 09:28
  • Well usually the .htaccess "lets through" the calls to physical files and folders. That's where might be the problem. On the other hand you might have set something in your application/bootstrap.php that is behaving this way. I guess quoting your .htaccess and bootstrap.php would help a lot. – MaGnetas Dec 15 '13 at 09:30

1 Answers1

0

Below is the default .htaccess file (example.htaccess) that ships with Kohana.

# Turn on URL rewriting
RewriteEngine On

# Installation directory
RewriteBase /

# Protect hidden files from being viewed
<Files .*>
    Order Deny,Allow
    Deny From All
</Files>

# Protect application and system files from being viewed
RewriteRule ^(?:application|modules|system)\b.* index.php/$0 [L]

# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Rewrite all other URLs to index.php/URL
RewriteRule .* index.php/$0 [PT]

To enable your check.php file to be executed ensure that your .htaccess file contains the following lines at the bottom:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* index.php/$0 [PT]
MrP
  • 336
  • 1
  • 4