WordPress.org

Forums

[resolved] Page Redirect (6 posts)

  1. davestewart
    Member
    Posted 7 years ago #

    I sometimes need to link to pages outside of the WordPress criteria, but logically have the Page included in the WordPress Page hierarchy.

    So - I've created a solution (that I'm sharing). It's actually a template, but it doesn't really fit in the "Themes" category as it's mindset is more "plugin" based.

    Simply upload the template-redirect.php file to your themes directory, then to create a new page that invisibly redirects to any other page, you

    1. Create a new Page in your WordPress control panel
    2. Enter the URL (or local path) you want to redirect to, as the only page content
    3. Set the Page Template to "Page Redirect"

    Simple as that.

    More info and download here.

  2. ollerwe
    Member
    Posted 7 years ago #

    Hi Dave!

    Could you tell me in which situations you might need a redirect page? Is it if an unexpected error occurs? I wonder if I could use your solution in the case of a falied log-in, instead of going back to the login-form or the site address...

    Regards
    Erico

  3. mahalie
    Member
    Posted 7 years ago #

    Enrico/ollerwe,

    You're looking for custom 404 error pages, and you can put a redirect link on those.

    Dave is talking about redirecting a page link in WordPress. An example you might want to do this is that you install a message board on a subdomain, so discuss.yourblog.com. You want to use WordPress to manage your menus and all that nice stuff so you create a page called 'Message Board' and now you need to redirect the WP-generated page yourblog.com/message-board to discuss.yourblog.com automatically.

    You can use a redirect statement in your header as Dave offers. I think that if you have access to writing your own .htaccess directives it would be more efficient/faster for the site/user to create and .htaccess redirect. This may be a little advanced those unfamiliar with apache servers but it pretty easy to do.

    I am looking for a plugin that simply does what I describe above but within the admin GUI. Anyone?

  4. mahalie
    Member
    Posted 7 years ago #

    Here's a plugin to automate redirects:
    http://urbangiraffe.com/plugins/redirection/

    It doesn't use .htaccess, functions entirely within wordpress but does what I was speaking about with the bonus of tracking 404 errors for you and some other nifty stuff.

  5. ollerwe
    Member
    Posted 7 years ago #

    Thank you!
    I will try that :-)

  6. tanvirmohammad
    Member
    Posted 6 years ago #

    Thank you Dave

Topic Closed

This topic has been closed to new replies.

About this Topic