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 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置