WordPress.org

Ready to get started?Download WordPress

Forums

Redirection
Redirect root folder but not children pages (4 posts)

  1. Todd
    Member
    Posted 1 year ago #

    Hello

    I want to redirect http://www.mysite.com/test-page/ to http://www.mysite.com/test, BUT - I want pages such as http://www.mysite.com/test-page/child-page/ to still work.

    Is this possible and if so how do I create this rule?

    Thanks!!
    Todd

    http://wordpress.org/extend/plugins/redirection/

  2. jrf
    Member
    Posted 1 year ago #

    Hi Todd,

    Of course it's possible ;-)

    Use the following settings:
    Source url: ^/test-page/$
    Target url: /test/
    and check the regular expression box.

    Hope this helps.

    Smile,
    Juliette

  3. Todd
    Member
    Posted 1 year ago #

    Hi Juliette

    I tried that and it didn't work.

    Wasn't sure if ^ should have been there so I tried it both ways.

    Any other ideas?

    -Todd

  4. jrf
    Member
    Posted 1 year ago #

    The regex is correct and the ^ should be there. This should work.

    Other ideas ? Add a rule to the same effect to .htaccesss.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.