nginx rewrite does not take effect when written
过去多啦不再A梦
过去多啦不再A梦 2017-07-03 11:43:09
0
2
1031

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

过去多啦不再A梦
过去多啦不再A梦

reply all(2)
曾经蜡笔没有小新

#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梦

Sorry, the server cannot get the data after # of URL. This part can only be processed on the front end.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template