Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

How do I do a redirect?

Options

Comments

  • Registered Users Posts: 2,164 ✭✭✭hobochris


    <meta http-equiv="refresh" content="5;url=http://example.com/" />
    
    Change the 5 to how many seconds you wish to wait before redirecting and the url to your new url.


  • Registered Users Posts: 9,579 ✭✭✭Webmonkey


    Easiest and cleanest way to do with HTTP headers using PHP

    [php]
    header('location: http://www.newsite.com');
    [/php]

    Make sure to place right at top of index.php before any content rendered out, before headers sent.


    Edit - Ok I see what you mean, you want to mirror the links off old site to new one. This can be done using Mod Rewrite htacess files.

    Try this htaccess file in your root directory:
    RewriteEngine On
    RewriteRule ^(.*)$ http://www.yournewdomain.com/$1 [R=301,L]
    


  • Moderators, Motoring & Transport Moderators, Music Moderators Posts: 12,778 Mod ✭✭✭✭Zascar


    Thanks Webmonkey that worked perfectly!
    Cheers :-D


  • Registered Users Posts: 9,579 ✭✭✭Webmonkey


    No probs!


Advertisement