male110
V2EX  ›  问与答

问个 url 重写的问题

  •  
  •   male110 · Jun 29, 2018 · 2140 views
    This topic created in 2893 days ago, the information mentioned may be changed or developed.

    比如一般 http://xxx.com/article/index 对应的是 articleController,index 方法。 现在是在 http://xxx.com/dir/article/index 现在又多了一层目录 dir 这时 url 重写规怎么写? Nginx 怎么做? Apache 怎么做?

    1 replies    2018-06-29 13:25:24 +08:00
    xiaoxinshiwo
        1
    xiaoxinshiwo  
       Jun 29, 2018
    dir 这一层就是 contextPath 了吧? tomcat server.xml 可以设置的啊,nginx 设置转发就好了吧
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2836 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 08:00 · PVG 16:00 · LAX 01:00 · JFK 04:00
    ♥ Do have faith in what you're doing.