海华沙和 Drupal
我也在 serverfault 上发布了这个,但我可能在错误的组中询问。
我正在使用 Hiawatha Web 服务器并在 FastCGI PHP 服务器上运行 drupal。
drupal 站点正在使用 imagecache,它需要私有文件或干净的 url。 我遇到的干净 url 问题是对文件的请求也被重写到了 index.php 中。
我当前的配置是:
UrlToolkit {
ToolkitID = drupal
RequestURI exists Return
Match (/files/*) Rewrite $1
Match ^/(.*) Rewrite /index.php?q=$1
}
以上不起作用。
Drupal 的 apache 设置是:
<Directory /var/www/example.com>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</Directory>
I posted this on serverfault as well, but I probably asked in the wrong group.
I am using the Hiawatha web server and running drupal on a FastCGI PHP server.
The drupal site is using imagecache and it requires either private files or clean urls.
The issue I am having with clean urls is that requests to files are being rewritten into index.php as well.
My current config is:
UrlToolkit {
ToolkitID = drupal
RequestURI exists Return
Match (/files/*) Rewrite $1
Match ^/(.*) Rewrite /index.php?q=$1
}
The above does not work.
Drupal's apache set up is:
<Directory /var/www/example.com>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</Directory>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您缺少规则的“返回”值:
I think that you are missing the "Return" value for your rule: