2010-04-09 60 views
0

我也在serverfault上发布了这个,但是我可能会在错误的组中提问。Hiawatha和Drupal

我正在使用Hiawatha web服务器并在FastCGI PHP服务器上运行drupal。
drupal网站使用imagecache,它需要私人文件或干净的网址。 我使用干净的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> 

回答

0

我认为你缺少你的规则 “返回” 值:

UrlToolkit { 
    ToolkitID = drupal 
    RequestURI exists Return 
    Match (/files/*) Rewrite $1 Return 
    Match ^/(.*) Rewrite /index.php?q=$1 
}