Support » Plugin: Redirection » Redirect to subfolder

  • Hi, can I use this plugin to redirect as follows?
    example.com/whatever requests to example.com/subfolder/whatever
    If so, how can I do that please? Thanks!

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author John Godley

    (@johnny5)

    Yes, you can redirect to any URL you want. Just create a redirect with source = /whatever and target = /subfolder/whatever

    Thread Starter Jakub

    (@meangreen)

    But how can I do that using regex please? The whatever part could be an arbitrary string.

    I have the same question.

    I try to redirect ‘test/whatever/something-else’ to ‘/’

    My redirection entry is ‘test/’ as source and ‘/’ as target, with regex.

    It will redirect pass everything after test/ to target as well, so redirect target becomes /whatever/something-else but i want / as target

    I want to redirect ‘test/whatever/something-else’ and also ‘test/whatever’ and ‘test/asghjhadg’ just to ‘/’ and not copy everything after ‘/test/’ to my target url

    • This reply was modified 3 years, 3 months ago by kelvink.
    • This reply was modified 3 years, 3 months ago by kelvink.
    Plugin Author John Godley

    (@johnny5)

    kelvink, can you show your redirect setup here? A screenshot of the item in Redirection should be fine.

    Thread Starter Jakub

    (@meangreen)

    John, this doesn’t work for example:
    Source: (.{0,})\/(.{0,})
    Target: $1\/whatever\/$2

    Any ideas how to make it work?

    Plugin Author John Godley

    (@johnny5)

    Jakub, can you give a real URL you are matching against? Did you enable the regex checkbox?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Redirect to subfolder’ is closed to new replies.