专著于富媒体技术~
本站某些作品来源于互联网,如果侵犯了您的利益,请留言说明!
本站某些作品来源于互联网,如果侵犯了您的利益,请留言说明!
[ISAPI_Rewrite]
CacheClockRate 3600
RepeatLimit 32
RewriteRule ^(.*)/post/([0-9]+)/?([0-9]+)?/?([0-9]+)?/?$ $1/read\.php\?entryid=$2&page=$3&part=$4 [I]
RewriteRule ^(.*)/page/([0-9]+)/([0-9]+)/?$ $1/index\.php\?mode=$2&page=$3 [I]
RewriteRule ^(.*)/starred/([0-9]+)/?([0-9]+)?/?$ $1/star\.php\?mode=$2&page=$3 [I]
RewriteRule ^(.*)/category/([^/]+)/?([0-9]+)?/?([0-9]+)?/?$ $1/index\.php\?go=category_$2&mode=$3&page=$4 [I]
RewriteRule ^(.*)/archiver/([0-9]+)/([0-9]+)/?([0-9]+)?/?([0-9]+)?/?$ $1/index\.php\?go=archive&cm=$2&cy=$3&mode=$4&page=$5 [I]
RewriteRule ^(.*)/date/([0-9]+)/([0-9]+)/([0-9]+)/?([0-9]+)?/?([0-9]+)?/?$ $1/index\.php\?go=showday_$2-$3-$4&mode=$5&page=$6 [I]
RewriteRule ^(.*)/user/([0-9]+)/?$ $1/view\.php\?go=user_$2 [I]
RewriteRule ^(.*)/tags/([^/]+)/?([0-9]+)?/?([0-9]+)?/?$ $1/tag\.php\?tag=$2&mode=$3&page=$4 [I]
RewriteRule ^(.*)/component/id/([0-9]+)/?$ $1/page\.php\?pageid=$2 [I]
RewriteRule ^(.*)/component/([^/]+)/?$ $1/page\.php\?pagealias=$2 [I]
#Customized URL
RewriteRule ^(.*)/alias/([^/]*)\_?([0-9]+)?\_?([0-9]+)?/?$ $1/read\.php\?blogalias=$2&page=$3&part=$4 [I]
#Force redirection for old rules
RewriteRule ^(.*)/post/([0-9]+)\.htm$ $1/post/$2/ [R]
RewriteRule ^(.*)/post/([0-9]+)\_([0-9]+)\.htm$ $1/post/$2/$3/ [R]
RewriteRule ^(.*)/post/([0-9]+)\_([0-9]+)\_([0-9]+)\.htm$ $1/post/$2/$3/$4/ [R]
RewriteRule ^(.*)/index\_([0-9]+)\_([0-9]+)\.htm$ $1/page/$2/$3/ [R]
RewriteRule ^(.*)/star\_([0-9]+)\_([0-9]+)\.htm$ $1/starred/$2/$3/ [R]
RewriteRule ^(.*)/category\_([0-9]+)\.htm$ $1/category/$2/ [R]
RewriteRule ^(.*)/category\_([0-9]+)\_([0-9]+)\_([0-9]+)\.htm$ $1/category/$2/$3/$4/ [R]
RewriteRule ^(.*)/archive\_([0-9]+)\_([0-9]+)\.htm$ $1/archiver/$2/$3/ [R]
RewriteRule ^(.*)/archive\_([0-9]+)\_([0-9]+)\_([0-9]+)\_([0-9]+)\.htm$ $1/archiver/$2/$3/$4/$5/ [R]
RewriteRule ^(.*)/showday\_([0-9]+)\_([0-9]+)\_([0-9]+)\.htm$ $1/date/$2/$3/$4/ [R]
RewriteRule ^(.*)/showday\_([0-9]+)\_([0-9]+)\_([0-9]+)\_([0-9]+)\_([0-9]+)\.htm$ $1/date/$2/$3/$4/$5/$6/ [R]
CacheClockRate 3600
RepeatLimit 32
RewriteRule ^(.*)/post/([0-9]+)/?([0-9]+)?/?([0-9]+)?/?$ $1/read\.php\?entryid=$2&page=$3&part=$4 [I]
RewriteRule ^(.*)/page/([0-9]+)/([0-9]+)/?$ $1/index\.php\?mode=$2&page=$3 [I]
RewriteRule ^(.*)/starred/([0-9]+)/?([0-9]+)?/?$ $1/star\.php\?mode=$2&page=$3 [I]
RewriteRule ^(.*)/category/([^/]+)/?([0-9]+)?/?([0-9]+)?/?$ $1/index\.php\?go=category_$2&mode=$3&page=$4 [I]
RewriteRule ^(.*)/archiver/([0-9]+)/([0-9]+)/?([0-9]+)?/?([0-9]+)?/?$ $1/index\.php\?go=archive&cm=$2&cy=$3&mode=$4&page=$5 [I]
RewriteRule ^(.*)/date/([0-9]+)/([0-9]+)/([0-9]+)/?([0-9]+)?/?([0-9]+)?/?$ $1/index\.php\?go=showday_$2-$3-$4&mode=$5&page=$6 [I]
RewriteRule ^(.*)/user/([0-9]+)/?$ $1/view\.php\?go=user_$2 [I]
RewriteRule ^(.*)/tags/([^/]+)/?([0-9]+)?/?([0-9]+)?/?$ $1/tag\.php\?tag=$2&mode=$3&page=$4 [I]
RewriteRule ^(.*)/component/id/([0-9]+)/?$ $1/page\.php\?pageid=$2 [I]
RewriteRule ^(.*)/component/([^/]+)/?$ $1/page\.php\?pagealias=$2 [I]
#Customized URL
RewriteRule ^(.*)/alias/([^/]*)\_?([0-9]+)?\_?([0-9]+)?/?$ $1/read\.php\?blogalias=$2&page=$3&part=$4 [I]
#Force redirection for old rules
RewriteRule ^(.*)/post/([0-9]+)\.htm$ $1/post/$2/ [R]
RewriteRule ^(.*)/post/([0-9]+)\_([0-9]+)\.htm$ $1/post/$2/$3/ [R]
RewriteRule ^(.*)/post/([0-9]+)\_([0-9]+)\_([0-9]+)\.htm$ $1/post/$2/$3/$4/ [R]
RewriteRule ^(.*)/index\_([0-9]+)\_([0-9]+)\.htm$ $1/page/$2/$3/ [R]
RewriteRule ^(.*)/star\_([0-9]+)\_([0-9]+)\.htm$ $1/starred/$2/$3/ [R]
RewriteRule ^(.*)/category\_([0-9]+)\.htm$ $1/category/$2/ [R]
RewriteRule ^(.*)/category\_([0-9]+)\_([0-9]+)\_([0-9]+)\.htm$ $1/category/$2/$3/$4/ [R]
RewriteRule ^(.*)/archive\_([0-9]+)\_([0-9]+)\.htm$ $1/archiver/$2/$3/ [R]
RewriteRule ^(.*)/archive\_([0-9]+)\_([0-9]+)\_([0-9]+)\_([0-9]+)\.htm$ $1/archiver/$2/$3/$4/$5/ [R]
RewriteRule ^(.*)/showday\_([0-9]+)\_([0-9]+)\_([0-9]+)\.htm$ $1/date/$2/$3/$4/ [R]
RewriteRule ^(.*)/showday\_([0-9]+)\_([0-9]+)\_([0-9]+)\_([0-9]+)\_([0-9]+)\.htm$ $1/date/$2/$3/$4/$5/$6/ [R]
如何配置PHP环境及安装isapi_write请看Windows 2003 IIS下配置MySQL+PHP+ISAPI_Rewrite+Zend+Xcache...
要使该规则生效,请首先修改inc/url.php...
修改方法: 打开inc/url.php(不要用记事本打开,用支持utf-8去BOM的编辑工具打开),然后找到
function getlink_entry ($id, $alias, $page=null, $part=null) {}
函数里的
{$alias}/
,并修改为"alias/{$alias}/"
然后重启IIS,看看别名是否生效了...别名会显示成http://www.niuc.net/alias/isapi-rewrite-rule-for-bo-blog/
如果不喜欢这种URL样式,可以修改成其他的...把规则里的
[code]#Customized URL
RewriteRule ^(.*)/alias/([^/]*)\_?([0-9]+)?\_?([0-9]+)?/?$ $1/read\.php\?blogalias=$2&page=$3&part=$4 [I]
前面的RewriteRule ^(.*)/alias/([^/]*)\_?([0-9]+)?\_?([0-9]+)?/?改成其他的样式,然后对应修改alias/{$alias}/样式就可以了...
此修改只推荐有编写正则表达式能力的用户,如果你不知道URL REWRITE规则,或者不知道怎么写正则表达式,请不要盲目修改...
有需要的用户,可以留言,把你想要修改的样式告诉我,我帮你修改...
修改好的代码文件下载:
下载文件 (已下载 102 次)有问题,请留言联系...
作者:gdgzboy@牛C网
地址:http://www.niuc.net/alias/isapi-rewrite-rule-for-bo-blog/
版权所有。转载时必须以链接形式注明作者和原始出处及本声明!
牛C网推荐您再看看以下日志:
viewstat 修改版 for bo-blog by gdgzboy@牛C网
bo-blog自动加版权插件(add copyright for bo-blog)2.0发布
bo-blog自动加版权插件(add copyright for bo-blog)1.0发布
三款BLOG程序抉择:WordPress BO-blog Sablog-X
bo-blog一键整理所有标签代码
Windows 2003 IIS下配置MySQL+PHP+ISAPI_Rewrite+Zend+Xcache
bo-blog自动加版权插件(add copyright for bo-blog)更新为3.1
什么是伪静态?SEO中如何理解伪静态?
viewstat 修改版 for bo-blog by gdgzboy@牛C网
bo-blog自动加版权插件(add copyright for bo-blog)2.0发布
bo-blog自动加版权插件(add copyright for bo-blog)1.0发布
三款BLOG程序抉择:WordPress BO-blog Sablog-X
bo-blog一键整理所有标签代码
Windows 2003 IIS下配置MySQL+PHP+ISAPI_Rewrite+Zend+Xcache
bo-blog自动加版权插件(add copyright for bo-blog)更新为3.1
什么是伪静态?SEO中如何理解伪静态?
上一篇




我也想问下为什么现在windows主机的那些高级优化httpd.in文件为什么不能支持别名呢
谢谢了
期待你的消息.谢谢
我用了httpd.ini,但自定义页面只能通过id显示,如果加别名,就不能显示。
httpd.ini只解决了从页面地址到真正程序页,但是如果页面上的地址无法做成静态,那一切都是多余的...
你问的问题是需要改程序的...
能否将alias改成post?或者其他?
谢谢!
http://www.niuc.net/XXX可以吗?
也就是中间不要alias