您的位置:首页 > 其它

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

2008-07-16 13:29 513 查看
如果你的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]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: