[英]Kohana 3.0 installation problems - New controller issues
我一直在尝试在自己的WAMP服务器上安装Kohana,但是一直陷入困境。 在修改.htaccess文件之前,我一直按照此处的说明进行操作。 我按照指定的方向进行了重定向,但随后收到“内部服务器错误”消息,指出这是配置错误。 我尝试了很多组合,但仍然遇到相同的错误。
我发现的唯一可行的方法是不包括.htaccess文件,而只是正确地将bootstrap.php指向正确的路径。 这呈现了我的welcome.php控制器示例,但是,然后我尝试创建一个新的控制器(如前所述)并输入特定路径(mysite / controller_name),但出现404错误。
有什么想法我要去哪里吗?
bootstrap.php-
Kohana::init(array(
'base_url' => '/shiftrunner/kohana-shiftrunner/',
'index_file' => ''
));
.htaccess-#打开URL重写RewriteEngine
# Installation directory
RewriteBase /shiftrunner/kohana-shiftrunner 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]
您的RewriteBase应该是/shiftrunner/kohana-shiftrunner/
并带有以下斜杠,与引导程序中的base_url
完全相同。
index_file
应设置为false
,如果你不想它显示的,不是''
。
如果上述方法无法解决问题,我也尝试更换
RewriteRule .* index.php/$0 [PT]
与
RewriteRule .* index.php [L]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.