【发布时间】:2010-09-08 09:34:45
【问题描述】:
我正在使用 Kohana 框架开发一个 php 应用程序,该框架默认启用 url 重写。
我需要翻译 htaccess 文件中定义的这些规则,但我无法弄清楚。
# Turn on URL rewriting
RewriteEngine On
# Installation directory
RewriteBase /kohana/
# 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]
提前致谢!
【问题讨论】:
标签: url-rewriting kohana