douhunbei0166 2015-09-23 19:57
浏览 47
已采纳

镆铘。 Apache URL重写问题

I faced with URL rewrite issue. Please help me to understand where is the problem or show me the way where to look.

Before the issue appeared I moved my modx evo to another host. There I faced with compatiblity issue. I used modx 1.0.6. On server installed php 5.5 (I can't find information about compatibility modx and php5.5. Everything except url rewrite is working well). I upgraded modx to 1.0.15

So to reproduce the issue you need to enable frendly urls and open any page. You get following error:

Not Found

The requested URL /gallery was not found on this server.

Apache/2.4.7 (Ubuntu) Server at zvezda-vostoka.ru Port 80

Here is htaccess:

php_flag register_globals Off
AddDefaultCharset utf-8
php_value date.timezone Europe/Moscow

Options +FollowSymlinks
RewriteEngine On
RewriteBase /

RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
RewriteRule .* - [F,L]

RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\.zvezda-vostoka\.ru [NC]
RewriteRule (.*) http://www.zvezda-vostoka.ru/$1 [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
  • 写回答

1条回答 默认 最新

  • doudui1850 2015-09-24 14:22
    关注

    I put Deny from all at the beginning of .htaccess.

    Saw that nothing happen.

    Then saw AllowOverride None in apache config for <Directory /var/www/>.

    And changed it to AllowOverride All

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥200 uniapp长期运行卡死问题解决
  • ¥15 latex怎么处理论文引理引用参考文献
  • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?
  • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?
  • ¥15 乘性高斯噪声在深度学习网络中的应用