【发布时间】:2014-07-25 20:11:47
【问题描述】:
我试过这两个代码。但它不工作。它也需要访问公共文件夹。
http://docs.phalconphp.com/en/latest/reference/tutorial.html
#www/tutorial/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ public/ [L]
RewriteRule (.*) public/$1 [L]
</IfModule>
#www/tutorial/public/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?_url=/$1 [QSA,L]
</IfModule>
【问题讨论】:
-
并且 mod_rewrite 处于活动状态?
-
我不知道该怎么做。
-
我试过这个“sudo a2enmod rewrite”,它说“模块重写已经启用”。我认为 mod_rewrite 已启用。
-
我的 localhost 文件夹是 www/html/... 不是 www/...
标签: php apache .htaccess phalcon