donglie7778 2014-06-05 00:50
浏览 47
已采纳

phalcon框架中的友好URL在Ubuntu中不起作用[关闭]

I have tried these two codes. but It is not working. It need to access public folder too.

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>
  • 写回答

2条回答 默认 最新

  • donglang1894 2014-06-05 02:06
    关注

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 像这种代码要怎么跑起来?
  • ¥15 怎么改成循环输入删除(语言-c语言)
  • ¥15 安卓C读取/dev/fastpipe屏幕像素数据
  • ¥15 pyqt5tools安装失败
  • ¥15 mmdetection
  • ¥15 nginx代理报502的错误
  • ¥100 当AWR1843发送完设置的固定帧后,如何使其再发送第一次的帧
  • ¥15 图示五个参数的模型校正是用什么方法做出来的。如何建立其他模型
  • ¥100 描述一下元器件的基本功能,pcba板的基本原理
  • ¥15 STM32无法向设备写入固件