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

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 人关注

推荐内容

开启rewrite后都报404,后台也进不去,怎么关闭rewrite?
伪静态的简短模式与默认模式的.htaccess的写法一样吗?
怎么去掉URL中那个问号
我的服务器是windows 无法用伪静态
本地windows下安装在wamp下如何开启伪静态?
nginx的Rewrite设置无效,请教如何解决
分享:IIS下Anwsion的伪静态规则httpd.ini的写法
anwsion伪静态设置,这个是apache的 用.htaccess 不用官方给的
BUG反映?:后台rewrite设置似无效?