如果你的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的简单设置:
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]