Support » Plugin: Redirection » Redirect entire folder

Viewing 7 replies - 1 through 7 (of 7 total)
  • alpipego

    (@alpipego)

    You have to add a regex redirect like this

    Source URL: /folder1(.+)$
    Match: Check Regular expression
    Target URL: /folder2$1

    alpipego

    (@alpipego)

    I noticed that you have both folder1/ and folder1.php in your example… is it really like that on your site? Maybe you can paste some real URLs (and remove the domain part if you don’t wish to show that).

    Thread Starter Littlemailman

    (@littlemailman)

    I wish to redirect all urls like these to the frontpage or another url.
    These .php files exists from an old website version that was not using WordPress:

    ​/forum.php
    ​/forum.php?funk=post&id=2996
    ​/forum.php?funk=post&id=6354
    /forum.php?funk=room&id=9&site=5&nr=15
    I have many of thede urls.

    What should my regex redirect look like ?

    alpipego

    (@alpipego)

    It could look like:

    Source URL: /forum.php(.+)$
    Target URL: /folder/$1

    That won’t take care of the query string however, so your new url would look like, e.g. /folder/?funk=room&id=9&site=5&nr=15

    Thread Starter Littlemailman

    (@littlemailman)

    @alpipego
    If I want /forum.php and all versions of /forum.php?xxxx=xxxx to redirect to the frontpage this is enough ?

    Source URL: /forum.php(.+)$
    Target URL: http://mysite.com

    alpipego

    (@alpipego)

    Yes that will do it. Can be shortened to

    Source URL: /forum\.php.+
    Target URL: http://mysite.com

    Can i ask about too?

    my source is /en/folder-/
    my target is /en/folder/

    how it should be looks in redirect?

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