我需要把
/module/index.html#/
转成
/index#/
不要前面的module
/module/merchant.html#/
转成
/merchant#/
我写的
rewrite ^/module/index.html(.*)$ /index#/$1;
直接404b
我需要把
/module/index.html#/
转成
/index#/
不要前面的module
/module/merchant.html#/
转成
/merchant#/
我写的
rewrite ^/module/index.html(.*)$ /index#/$1;
直接404b
2 回答987 阅读
1 回答756 阅读✓ 已解决
1 回答627 阅读
667 阅读
208 阅读
#
后面的数据是HTML页面处理的,而不是路由处理的,所以你的重写规则应该是:就可以了。
你需要做的只是把
.html
和/module/
去掉而已。另外,我不知道你是想地址写
/module/index.html
,来访问/index
,还是地址写/index
来访问/module/index.html
,如果是后者的话,就不是上面那个了,应该是: