Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1169404
    Amanda P
    Participant

    Hi,

    I have a client that is switching their domain name.

    They have sent out many links to their current blog posts: eg. domain.com/post-name/

    and they want the users to still be able to click those urls, but go to the new domain version of the posts: eg. newdomain.com/post-name/

    Is there a quick way to achieve this? If I redirect domain.com to newdomain.com will the post urls automatically redirect too?

    I read some other article that says you can put something in the theme template to achieve this, but I’m not sure where I’d do that with X.

    Many thanks!

    #1169779
    Rad
    Moderator

    Hi there,

    Thanks for writing in.

    Please edit your old site’s .htaccess file and replace the existing rewrite rules with this

      RewriteEngine On
      RewriteCond %{HTTP_HOST} ^domain.com$ [OR]
      RewriteCond %{HTTP_HOST} ^www.domain.com$
      RewriteRule (.*)$ http://newdomain.com/\ [R=301,L]

    Hope this helps.

  • <script> jQuery(function($){ $("#no-reply-1169404 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>