Git Product home page Git Product logo

Comments (3)

adrenth avatar adrenth commented on May 30, 2024

Hi @abass,

Thanks for the compliment! Glad you like the plugin as much as I do.

You can actually do this by creating a redirect as such:

Redirect Type: Placeholders
Source Path: /meet/{anything}
Target Path: https://app.prosperworks.com/public/meeting-sceduler/{anything}

Create a new Requirement set:
Placeholder: {anything}
Requirement: (.*)

Please let me know if this works for you.

from oc-redirect-plugin.

abass avatar abass commented on May 30, 2024

Hey @adrenth - thank you so much, it almost works!

I have it mostly set up how I would like it, but I'm trying to figure out a way to make it work in this instance:
image

I have a different destination URL with /m/alex versus /m/alex/60.

Is there a way to have the general /m/alex{date} only respect when a date is added and ignore all others?

Because right now, m/alex{date} actually overrides the /m/alex/60{date} so it just takes /60/2019-10-12 and appends it at the end instead of letting the /m/alex/60/2019-10-12 trigger.

Not sure how much that makes sense, but essentially, if I disable either one of the top 2, the other one works perfectly. Just when they are both enabled, /m/alex{date} takes precedent and overwrites. Curious if there's any way to do some type of exact match while also using placeholders in some way.

EDIT: Recorded a quick video that should help better explain:
https://share.getcloudapp.com/2Nu2pRPX

from oc-redirect-plugin.

adrenth avatar adrenth commented on May 30, 2024

Hi @abass,

I think the part you are missing here is the power of regular expressions. Each placeholder can have additional regex conditions (Requirements) to match against.

You need to specify a Requirement-set for the {date} placeholder.

So you can use ^\d{4}\-(0[1-9]|1[012])\-(0[1-9]|[12][0-9]|3[01])$ to match a date.

Make sure you put the redirects in the correct order. You can prioritise the redirects by assigning an order number to it (see General tab).

I hope this will bring you further.

from oc-redirect-plugin.

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.