http://docs.phalconphp.com/en/latest/reference/ tutorial.html
< IfModule mod_rewrite.c>
RewriteEngine叙述上
重写规则^ $公共/ [L]
重写规则(。*)公共/ $ 1 [L]
< / IfModule>
< IfModule mod_rewrite.c>
RewriteEngine叙述上
的RewriteCond%{} REQUEST_FILENAME!-d
的RewriteCond%{} REQUEST_FILENAME!-f
重写规则^(。*)$的index.php?_url = / $ 1 [QSA,L]
< / IfModule>
解决方案
如果的mod_rewrite
已启用,我的猜测是,你的服务器是不符合的AllowOverride
选项正确设置...
所有的的.htaccess 文件中默认的Apache忽略,因为一个人可以管理到的.htaccess 文件上传到服务器上,并覆盖你的服务器配置。如果你确信你的服务器的文件系统是受保护的,你可以明确在服务器的配置,你的设置,可以通过在目录中的任何的.htaccess
文件覆盖。
这是通过的AllowOverride
设置完成。请参阅 这个问题 了解多一点关于此
http://docs.phalconphp.com/en/latest/reference/tutorial.html
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ public/ [L]
RewriteRule (.*) public/$1 [L]
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?_url=/$1 [QSA,L]
</IfModule>
解决方案
If mod_rewrite
is enabled, my guess is that your server isn't with the AllowOverride
option properly set...
All .htaccess files are ignored by default in apache because someone can manage to upload a .htaccess file to your server and override your server configurations. If you're sure that your server's file system is protected you can explicit in the server's configuration that your settings can be overridden by any .htaccess
file in your directories.
This is done via the AllowOverride
setting. Refer to this question to understand a bit more about this.