You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
665 B

  1. <head>
  2. <link rel="stylesheet" href="css/style.css">
  3. </head>
  4. <h1>Rewriting paths</h1>
  5. <h2>Config</h2>
  6. <pre><code>
  7. {
  8. "rewrite": [
  9. { "from": "/css/*", "to": "/build/styles/$1" },
  10. { "from": "/npm/*", "to": "http://registry.npmjs.org/$1" },
  11. { "from": "/broken/*", "to": "http://localhost:9999" },
  12. { "from": "/:user/repos/:name", "to": "https://api.github.com/repos/:user/:name" }
  13. ]
  14. }
  15. </code></pre>
  16. <h2>Links</h2>
  17. <ul>
  18. <li><a href="/css/style.css">/css/style.css</li>
  19. <li><a href="/npm/local-web-server">/npm/local-web-server</a></li>
  20. <li><a href="/broken/">/broken/</a></li>
  21. <li><a href="/75lb/repos/work">/75lb/repos/work</a></li>
  22. </ul>