【问题标题】:Drupal 7 only works with index.php in url. Want to use friendly clean urlDrupal 7 仅适用于 url 中的 index.php。想使用友好的干净网址
【发布时间】:2018-04-22 06:59:18
【问题描述】:

rhel 服务器中安装了 drupal 7。我可以使用 index.php 访问页面。如果没有 index.php,页面将重定向到 404。我的根应用程序文件夹是 var/www/html/sivaraj

sivaraj.com/index.php/profile - 工作正常

sivaraj.com/profile - 获得 404

在 apache 中启用了 mode_rewrite。

<Directory "/var/www/html">
   Options Indexes FollowSymLinks
   AllowOverride None
   Allow From All
   Require All Granted
</Directory>

当将 AllowOverride 更改为 All 时会出现 Internal Server Error 500

<Directory "/var/www/html">
   Options Indexes FollowSymLinks
   AllowOverride None
   Allow From All
   Require All Granted
</Directory>

没有更改 drupal 默认 .htaccess 中的任何内容。尝试使用 RewriteRule 删除 index.php 没有任何效果。

【问题讨论】:

    标签: apache .htaccess mod-rewrite drupal-7 clean-urls


    【解决方案1】:

    尝试将 AllowOverride None 更改为 AllowOverride All 之后也应该重新启动 Apache

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-06-29
      • 2011-10-07
      • 1970-01-01
      • 2011-04-13
      • 1970-01-01
      • 1970-01-01
      • 2014-05-19
      • 2013-03-15
      相关资源
      最近更新 更多