我有一个在kohana开发的网站。该网站在现场工作正常。我在localhost中制作了本地副本,只有主页在本地工作。所有其他页面都显示以下错误
未找到
在此服务器上找不到请求的网址/demo/search-ad/search-detail.html。 位于localhost端口80的Apache / 2.2.15(CentOS)服务器
我将所有文件放在文件夹demo中,我的.htaccess文件更改如下
# Turn on URL rewriting
RewriteEngine On
# Installation directory
RewriteBase /demo
# Protect application and system files from being viewed
RewriteRule ^(application|system) - [F,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,L]
#RewriteRule ^(.*)$ index.php?/$0 [L]
答案 0 :(得分:0)
在 httpd.conf 文件中(可能在/ etc / httpd2 / conf /中),更改
AllowOverride None
到
AllowOverride All