Git Product home page Git Product logo

Comments (7)

andre-brdoch avatar andre-brdoch commented on June 15, 2024 10

It would be great if something like this would be possible:

/:dir/*.pdf /:dir/:splat 301!

from ask-netlify.

j-f1 avatar j-f1 commented on June 15, 2024 1
/api/:year/:month/:day/:slug    /:year/:slug

from ask-netlify.

ericmarcos avatar ericmarcos commented on June 15, 2024

Is this available already? I couldn't find any documentation.

from ask-netlify.

manniL avatar manniL commented on June 15, 2024

@ericmarcos I don't think so.

from ask-netlify.

j-f1 avatar j-f1 commented on June 15, 2024

It looks like they never finished episode 3 :(

from ask-netlify.

ddamato avatar ddamato commented on June 15, 2024

I actually have a more involved use-case. It would look something like this

/dir/:pdf /api/tracker?pdf=:pdf
/dir/:pdf.pdf https://bucket.s3.amazonaws.com/dir/:pdf.pdf 200

The API would then redirect to the url with extension with a location header.

So basically, the redirects handle a proxy to the API in order to track the number of times the file was requested. I used to do this with Apache but I think if the tokens were a little more strict here it could work.

To the user, all it would look like is that the url is just adding the extension for the file.

from ask-netlify.

philsturgeon avatar philsturgeon commented on June 15, 2024

I want to redirect from

/api/2018/04/13/openapi-and-json-schema-divergence-solved

to

/2018/openapi-and-json-schema-divergence-solved

but that doesnt seem possible with the * and splat...

from ask-netlify.

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.