原始地址:demo.com/_/app1/index.html ,重写后客户端看到的网址:demo.com/_app1/index.html, 如果要达到这样的重写效果,不知道正则表达式怎么写
1
sparkssssssss 2019 年 3 月 18 日
rewrite ^/([^/]+)/([^/]+)/(.*) /$1$2/$3 break;
|
2
daijinming OP @coolloves 感谢,但是这个好像对静态资源不管用,估计只对控制器有作用
|
3
imlinhanchao 2019 年 3 月 18 日 @daijinming 静态资源可以在 Nginx 做
|
4
TomVista 2019 年 3 月 18 日 global.asax
protected void Application_BeginRequest(object sender, EventArgs e) { if (Context.Request.FilePath == "/") Context.Request.rewrite(" something") } |