I need to put
/module/index.html#/
Turn into
/index#/
No need for the previous module
/module/merchant.html#/
Turn into
/merchant#/
I write
rewrite ^/module/index.html(.*)$ /index#/;
Direct 404b
曾经蜡笔没有小新2017-07-03 11:45:09
#
The data behind is processed by the HTML page, not by routing, so your rewriting rules should be:
rewrite ^/module/(.+)\.html$ /
That’s it.
All you need to do is remove .html
and /module/
.
In addition, I don’t know whether you want to write the address /module/index.html
to access /index
, or write the address /index
to access /module/index.html
, if it’s the latter , it’s not the one above, it should be:
rewrite ^/(.+)$ /module/.html
过去多啦不再A梦2017-07-03 11:45:09
Sorry, the server cannot get the data after #
of URL
. This part can only be processed on the front end.