Home Forums General issues 2 domains (.uk and co.uk) pointing one WordPress site – how to redirect

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #15375 Reply
    Przemyslaw Bik
    Guest

    Hello !!!

    I have a problem with proper redirect

    my domain https://magic-software.uk works perfect
    my domain magic-software.co.uk shows an error in ssl as the ssl cert is for .uk

    i want both of them to use this ssl as a magic-software.uk but any of redirect rules i tried not change co.uk to .uk in browser.

    how can i properly redirect this in .htaccess ??

    Please help.

    Kind Regards

    #15376 Reply
    Rogier
    Keymaster

    That should be something like this:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^yourOldDomain\.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.yourOldDomain\.com$
    RewriteRule (.*)$ https://yourNewDomain.com/$1 [R=301,L]
    </IfModule>
Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: 2 domains (.uk and co.uk) pointing one WordPress site – how to redirect
Your information: