【发布时间】:2012-03-11 03:35:52
【问题描述】:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA
寻求反馈
目标:我正在尝试在 Drupal 7 站点上启用“干净的 URL”(例如 example.com/?q=user 解析为 example.com/user)。
我刚刚花了太长时间翻阅官方 Drupal 文档和 cmets,但无济于事,因此非常感谢任何建议!
我在 Drupal (/admin/config/search/clean-urls) 中选中了“启用清理 URL”框,并清楚地知道配置选项已保存。所以现在我实际上可以访问 example.com/user,它确实显示与 example.com/?q=user 相同的内容。但是,我想要的是 example.com/?q=user 在 URI 中被重写为 example.com/user。
相关的 .htaccess 代码如上所示,我的 Apache conf 似乎配置正确。
【问题讨论】:
标签: .htaccess drupal-7 clean-urls