• Resolved jayq

    (@jayq)


    Hi,
    the downlodad Plugin generates URLs like

    domain.de/downloads/1465/

    And the Newsletter Plugin use post type urls
    domain.de/?post_type=dlm_download&p=1465

    only the ID / number is the same.
    can i dynamic redirekt and rewrite the first part and only get the number from the wrong url to the downlad url?
    Or maybe in .htaccess File?
    Can someone help me please?

    so that the next new download 1466 maybe and so on automatic. rewrite to.

    • This topic was modified 5 years, 9 months ago by jayq.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author John Godley

    (@johnny5)

    What downloaded plugin?

    You can find details about regular expressions here:

    https://redirection.me/support/redirect-regular-expressions/

    Thread Starter jayq

    (@jayq)

    I use mailpoet for newsletters and download monitor for downloads

    mailpoet set url to the downloads with custom post type like

    domain.de/?post_type=dlm_download&p=1465

    but i need

    domain.de/downloads/1465/

    i try it like

    ^/?post_type=dlm_download&p=(.*)&utm_source=mailpoet&utm_medium=email&utm_campaign=NL

    and
    /downloads/$1/

    but is not get the variable “p” from old url and use it on new url

    i dont now how to fix this. documentation is fine, but i had no basics in this, so i need a copy-paste help please.

    Plugin Author John Godley

    (@johnny5)

    There are a lot of tutorials online about regular expressions, and you can use https://regex101.com to test them. Remember that you must escape any special regular expression characters. For example, if you want to match ? then it needs to be \?

    Thread Starter jayq

    (@jayq)

    Yes the f***ing ? Was the problem.
    I figured out by try and error from some tut and that’s works now….

    Bilder-Upload.eu - share DEINE Bilder

    Maybe not the best way but it works.
    If you know a better way, let me know. I’m a noob 😂

    • This reply was modified 5 years, 9 months ago by jayq.
Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Dynamic URL rewrite’ is closed to new replies.