原创 Drupal在IIS下用ISAPI Rewrite实现Clean URLs的简单配置收藏

如果你的WEB服务器采用的是IIS而不是Apache的话,要实现Clean URLS,那么你就需要下载一个叫ISAPI Rewrite的东西。ISAPI Rewreit可以从http://writeblog.csdn.net/网站下载。

ISAPI Rewrite有两个版本,ISAPI_Rewrite 3 Full installatio和ISAPI_Rewrite 3 Lite installation。

ISAPI_Rewrite 3 Lite installation 是免费的,用这个就可以了。

安装好后,在安装目录下设置httpd.ini文件。免费的ISAPI Rwrite只能在安装目录下进行全局设置,收费版的可以将httpd.ini文件拷贝到单独的虚拟主机目录下进行单独的设置。

Drupal的简单设置:
# Accept a url with the following directories and pass them through unchanged.
RewriteRule /(?:misc|files|modules|themes|sites|uploads)/(.*) $0 [I,L]

# Make URLs sane
RewriteRule /cron\.php $0 [I,L]
RewriteRule /index\.php.* $0 [I,L]
RewriteRule /update\.php.* $0 [I,L]
RewriteRule /xmlrpc\.php $0 [I,L]

# deactivate following line if "robotstxt" module is installed
#RewriteRule /robots\.txt.* $0 [I,L]

RewriteRule /(.*)\?(.*) /index.php\?q=$1&$2 [I,L]
RewriteRule /(.*) /index.php\?q=$1 [I,L] 

发表于 @ 2008年07月16日 13:29:00|评论(loading...)|收藏

新一篇: Google改进对Flash的搜索索引 | 旧一篇: 通过Ruboss让Flex与Rails完美结合

用户操作
[即时聊天] [发私信] [加为好友]
dupang
订阅我的博客
XML聚合  FeedSky
订阅到鲜果
订阅到Google
订阅到抓虾
文章分类
收藏
    存档
    软件项目交易
    Csdn Blog version 3.1a
    Copyright © dupang