Php Kohana 404在此服务器上找不到请求的URL/评论
在现有kohana环境上设置新页面。我将httpd.config更改为以下内容 虚拟主机 包括conf/extra/httpd-vhosts.confPhp Kohana 404在此服务器上找不到请求的URL/评论,php,apache,kohana,kohana-3,Php,Apache,Kohana,Kohana 3,在现有kohana环境上设置新页面。我将httpd.config更改为以下内容 虚拟主机 包括conf/extra/httpd-vhosts.conf <virtualHost *:80> ServerAdmin admin@example.com DocumentRoot "C:/wamp/www/site/kohana" ServerName localhost </virtualHost> <virtualHost *:80>
<virtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot "C:/wamp/www/site/kohana"
ServerName localhost
</virtualHost>
<virtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot "C:/wamp/www/site/kohana"
ServerName localhost
<directory "C:/wamp/www/site/kohana">
Options Indexes FollowSymLinks
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</directory>
</virtualHost>
有人对我应该看什么有什么建议吗 我认为您在url中跳过了index.php文件 如果您像这样在web浏览器中键入url,它可能会起作用:
localhost/index.php/<controller>/<action>
localhost/index.php//
不是这样的:
localhost/<controller>/<action>
localhost//
检查,是否在phpinfo()处启用并加载apache mod_rewrite;
在我的例子中,我刚刚在apache上启用了mod_rewrite
sudo a2enmod rewrite
然后重新启动
sudo systemctl restart apache2
检查访问规则
并确保其中包含Controller\u Welcome类和方法
sudo a2enmod rewrite
sudo systemctl restart apache2