How to redirect like this?

7 replies
Hey all.

I am moving one of my WP blogs to another domain. The only problem I'm facing is redirection from old domain to new.

How can I redirect like this.

User goes to old-domain.com/2010/post, is shown a message (about domain change) for a few seconds and is redirected to new-domain.com/2010/post

I am able to delay the redirect with the code here, but can't figure out how to redirect to the same post.

Please help me.
Thanks
Karan
#redirect
  • Profile picture of the author TipTopMarketer
    Here's the meta refresh code...

    <meta HTTP-EQUIV="REFRESH" content="3; url=http://www.yourredirectlink.com">
    {{ DiscussionBoard.errors[2097770].message }}
    • Profile picture of the author Karan Goel
      Originally Posted by TipTopMarketer View Post

      Here's the meta refresh code...

      <meta HTTP-EQUIV="REFRESH" content="3; url=http://www.yourredirectlink.com">
      Hey

      I think you didn't read the post.

      Karan
      Signature
      Penalty Safe, Long Term, 100% Whitehat Backlinks
      Love your site? Then check out SafeSpokes!
      ~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_
      karan996@irchiver.com karan997@irchiver.com
      {{ DiscussionBoard.errors[2098975].message }}
      • Profile picture of the author Britt Malka
        Hi

        I think this is what you need:

        Add the following to your .htaccess file:

        Options +FollowSymLinks
        RewriteEngine on
        RewriteRule (.*) http://www.new-site.com/$1 [R=301,L]

        But if not, just search for 301 redirect, and you'll find plenty of tutorials about how to use this code in an .htaccess file.
        Signature
        *** Idea Factory ***
        9 Simple & Fun Ways to Come Up With Ideas for Non-Fiction Books

        >>> Click here to get immediate access <<<

        {{ DiscussionBoard.errors[2099018].message }}
        • Profile picture of the author stevendbrady
          Originally Posted by Britt Malka View Post

          Hi

          I think this is what you need:

          Add the following to your .htaccess file:

          Options +FollowSymLinks
          RewriteEngine on
          RewriteRule (.*) http://www.new-site.com/$1 [R=301,L]

          But if not, just search for 301 redirect, and you'll find plenty of tutorials about how to use this code in an .htaccess file.
          Ha! I spent too much time composing. You beat me to it.

          Cheers!
          {{ DiscussionBoard.errors[2099052].message }}
        • Profile picture of the author Karan Goel
          Originally Posted by Britt Malka View Post

          Hi

          I think this is what you need:

          Add the following to your .htaccess file:

          Options +FollowSymLinks
          RewriteEngine on
          RewriteRule (.*) http://www.new-site.com/$1 [R=301,L]

          But if not, just search for 301 redirect, and you'll find plenty of tutorials about how to use this code in an .htaccess file.
          Hey

          Thanks for your help. But, ONLY 301 won't solve the purpose. It would just redirect to the specified URL. But, I also need to show a custom message in a delay. Possible?
          Signature
          Penalty Safe, Long Term, 100% Whitehat Backlinks
          Love your site? Then check out SafeSpokes!
          ~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_
          karan996@irchiver.com karan997@irchiver.com
          {{ DiscussionBoard.errors[2101072].message }}
  • Profile picture of the author stevendbrady
    Can you use a 301 redirect in .htaccess to point to the same post on the new site? Then use WP Greet Box to display a message that says you moved if they came from your old URL? I'm not sure if the referrer will be the source, or your site. If it is then it should work just fine.

    Just a random thought. I've not tried to do this.

    WordPress › WP Greet Box WordPress Plugins
    {{ DiscussionBoard.errors[2099045].message }}
  • Profile picture of the author Karan Goel
    Hey!!

    Can anyone help me do the redirect to exact permalink with a delayed Javascript redirect?

    Thanks
    Karan
    Signature
    Penalty Safe, Long Term, 100% Whitehat Backlinks
    Love your site? Then check out SafeSpokes!
    ~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_
    karan996@irchiver.com karan997@irchiver.com
    {{ DiscussionBoard.errors[2108628].message }}

Trending Topics