该问题已被锁定!
2
关注
2874
浏览

IIS虚拟主机下,的Rewrite规则 web.config文件应该怎么写?

AI智能回复搜索中,请稍后...

查看全部 2 个回答

zvzoo 注册会员 用户来自于: 山东省
2017-02-13 12:45
[ISAPI_Rewrite]
3600 = 1 hour

CacheClockRate 3600
RepeatLimit 32
RewriteRule ^/$ /? [L]
RewriteRule ^/topic/(.*)$ /\?\/topic/$1 [L]
RewriteRule ^/users/(.*)$ /\?\/users/$1 [L]
RewriteRule ^/favorite/(.*)$ /\?\/favorite/$1 [L]
RewriteRule ^/explore/(.*)$ /\?\/explore/$1 [L]
RewriteRule ^/notifications/(.*)$ /\?\/notifications/$1 [L]
RewriteRule ^/inbox/(.*)$ /\?\/inbox/$1 [L]
RewriteRule ^/people/(.*)$ /\?\/people/$1 [L]
RewriteRule ^/setting/(.*)$ /\?\/setting/$1 [L]
RewriteRule ^/logout/(.*)$ /\?\/logout/$1 [L]
RewriteRule ^/publish/(.*)$ /\?\/publish/$1 [L]
RewriteRule ^/feature/(.*)$ /\?\/feature/$1 [L]
RewriteRule ^/home/(.*)$ /\?\/home/$1 [L]
RewriteRule ^/account/(.*)$ /\?\/account/$1 [L]
RewriteRule ^/login/(.*)$ /\?\/login/$1 [L]
RewriteRule ^/reader/(.*)$ /\?\/reader/$1 [L]
RewriteRule ^/search/(.*)$ /\?\/search/$1 [L]
RewriteRule ^/crond/(.*)$ /\?\/crond/$1 [L]
RewriteRule ^/invitation/(.*)$ /\?\/invitation/$1 [L]
RewriteRule ^/admin/(.*)$ /\?\/admin/$1 [L]
RewriteRule ^/m/(.*)$ /\?\/m/$1 [L]
RewriteRule ^/question/(.*)$ /\?\/question/$1 [L]
RewriteRule ^/category/(.*)$ /\?\/home/explore/category/$1 [L]
RewriteRule ^/feed/(.*)$ /\?\/feed/$1 [L]
RewriteRule ^/first_(.)$ /\?\/first_(.)/$1 [L]
RewriteRule ^/follow/(.*)$ /\?\/follow/$1 [L]
RewriteRule ^/weixin/(.*)$ /\?\/weixin/$1 [L]
RewriteRule ^/upgrade/(.*)$ /\?\/upgrade/$1 [L]
RewriteRule ^/article/(.*)$ /\?\/article/$1 [L] 
iis管理器 - url 重写 - 导入规则 复制上面代码 在“重写规则”下面黏贴代码 应用 后台开启伪静态 OK

关于作者

aijun 注册会员

这家伙很懒,还没有设置简介

问题动态

发布时间
2017-02-09 11:01
更新时间
2017-02-13 12:45
关注人数
2 人关注

推荐内容

nginx的Rewrite设置无效,请教如何解决
我的服务器是windows 无法用伪静态
开启伪静态第二个步骤能详细解释下具体怎么操作码?
IIS6下伪静态规则参考
如何实现这样的rewrite规则
BUG反映?:后台rewrite设置似无效?
lnmp如何启用中文URL?
rest 框架引入路由冲突
Bug?建议?:2.1版让人郁闷的地方