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 ^(?:modules|front)\b.* index.php/$0 [L] RewriteRule ^admin/.* admin.php?%{QUERY_STRING} [PT] # 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] #Set environment SetEnv KOHANA_ENV "production"
kohana 伪静态的htaccess设置
最新推荐文章于 2022-11-08 17:35:13 发布
本文介绍了如何通过Apache的.htaccess文件配置URL重写规则来保护应用文件、系统文件不被直接访问,并确保所有请求被重定向到index.php进行处理。此外还设置了环境变量为生产环境。
2247

被折叠的 条评论
为什么被折叠?



