Rewrite or Redirect old website domain to new domain with new url structure

Home Forums BulletProof Security Free Rewrite or Redirect old website domain to new domain with new url structure

Viewing 6 posts - 31 through 36 (of 36 total)
  • Author
    Posts
  • #22690
    jenni101
    Participant

    Thanks so much for your advice – as always your plugin does everything! Amazing! So thankful i found it ūüôā

    #32365
    jenni101
    Participant

    Hello,

    Another query re. site redirects I’m afraid.

    I’ve built a new site and moved it to a new server. My old site was a WP root install: my new site is in its own folder (so GWIOD install = public/subfolder-mysite).

    All old pages are redirected using 301 redirects to their newer counterparts and no errors showing – all good so far.

    I’ve uploaded the google file (eg: google1234.htm) for google site verification to both the root and to the sub-folder, and my main domain (mysite.com) verifies fine with Google.

    But when I try to verify my domain aliases (mysite.co.nz) in Google, it doesn’t work as it can’t seem to find the google1234.html file. So it’s a bit of a catch-22, as I now can’t verify my alias site in google; but I know I can redirect my alias to my mainsite in google, but only once its verified!

    So how do I redirect them? I currently have redirects for these aliases from non-www to www in my custom code like this:

    # WP REWRITE LOOP START
    RewriteEngine On
    RewriteBase /subfolder-mysite/
    RewriteCond %{HTTP_HOST} ^mysite\.com$ [NC]
    RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=301,L]
    RewriteCond %{HTTP_HOST} ^mysite\.co.nz$ [NC]
    RewriteRule ^(.*)$ http://www.mysite.co.nz/$1 [R=301,L]
    RewriteRule ^index\.php$ - [L]

    But this doesn’t seem to be working as when I input http://mysite.co.nz it takes me to a default webpage: http://mysite.co.nz/cgi-sys/defaultwebpage.cgi

    Can I add the redirect in here with something like this (with or without the main site subfolder?):

    # WP REWRITE LOOP START
    RewriteEngine On
    RewriteBase /subfolder-mysite/
    RewriteCond %{HTTP_HOST} ^mysite\.co.nz$ [NC]
    RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=301,L]
    RewriteRule ^index\.php$ - [L]

    Many thanks.

    Yours, totally stumped!

    #32367
    Nitin
    Participant

    permanent redirect like 301 redirect https://1nine.com/Web/HTTPRedirect, move your domain to 301 redirect.

    #32369
    AITpro Admin
    Keymaster

    @ jenni101 РGoogle site verification does not have anything to do with redirects.  Add-on/alias sites are separate/individual websites.  So you would need to verify each separate/individual site separately.  If you have a Google Analytics account you can verify each of your sites using the Google Analytics account alternative verification method in your Google Analytics account.

    #32413
    jenni101
    Participant

    Thanks for both of your replies.

    Yes, I’m trying to verify my alias domains in my Google analytics account – which is where it says it can’t verify them because it can’t find the google1234.html file, even though it’s in both the root and the sub-folder of the main .com site.

    So should I redirect the alias sites (mysite.co.nz) in the WP Rewrite loop to my main site (mysite.com), as above?

    Thanks.

    OK, after some more research I think I’m looking at the wrong thing for this – I think it should be ‘pointed’ to my main domain in cpanel and on my server account, with the correct DNS records. I’ll go this route for it now.

    Many thanks for your time, j

    #32416
    AITpro Admin
    Keymaster

    @ jenni101 – Yep, there are several different “alternative” methods to verify your sites. ¬†I can’t remember the exact details about all the different methods, but when you go to verify each of your websites, click the “Alternative verification” methods button or link. ¬†Not exactly sure what the exact name is for the button or link is, but you will see “alternative” used in the naming convention. ¬†The simplest method is to choose the “verification using your Google Analytics account” since you just need to be logged in your Google account and don’t need to mess around with uploading files or doing anything in your host control panel.

Viewing 6 posts - 31 through 36 (of 36 total)
  • You must be logged in to reply to this topic.