GithubHelp home page GithubHelp logo

Comments (7)

iwind avatar iwind commented on August 22, 2024

井号(#)是浏览器端的锚点,任何浏览器都不会将其及之后的片段发送给服务器端,所以,当你访问 http://abc.com/test/#/ 的时候,相当于访问 http://abc.com/test/

from build.

shenshunan avatar shenshunan commented on August 22, 2024

我是想代理前端工程,因为前端是用Vue写的,他的路径一般都是 http://abc.com/#/user/login/这样的路径,我现在的需求就是将http://abc.com/webapp1/#/user/login/转写成http://abc.com/#/user/login/。这个就没法通过配置实现。

from build.

iwind avatar iwind commented on August 22, 2024

你只需要将 /webapp1/ 重写为 / 即可。

from build.

shenshunan avatar shenshunan commented on August 22, 2024

在重写规则里,匹配规则写的是 /webapp1/(.+) ,目标URL写 /${1},然后在下面的匹配测试中,输入测试的地址http://abc.com/webapp1/#/user/login/,会提示匹配失败,只要去掉测试地址的#,即可成功改写。(.+)这个正则也改了好几种形式了,也不行。

from build.

iwind avatar iwind commented on August 22, 2024

你可以按照我说的直接保存然后试试:将 /webapp1/ 重写为 /

因为#号不被认为是标准URL的一部分。

from build.

shenshunan avatar shenshunan commented on August 22, 2024

from build.

iwind avatar iwind commented on August 22, 2024

在QQ或者微信群里吗?可以找我一下。

from build.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.