重写Drupal的文件系统路径以删除冗余站点/example.com网站
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了重写Drupal的文件系统路径以删除冗余站点/example.com网站相关的知识,希望对你有一定的参考价值。
My [original post](http://drupal.org/node/84895) languished for years before someone pointed out a possible solution [here](http://drupal.org/node/53705).The following user-submitted code may be useful in redirecting URLs for the /files directory to the /sites/example.com/files directory. The following code is added to the [drupal_root]/files/.htaccess file. **Note, this directory is not part of the default Drupal distribution and must be added.**
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /sites/%{HTTP_HOST}/files/$1 [L]
以上是关于重写Drupal的文件系统路径以删除冗余站点/example.com网站的主要内容,如果未能解决你的问题,请参考以下文章