Home › Forums › BulletProof Security Free › Rewrite or Redirect old website domain to new domain with new url structure
- This topic has 35 replies, 6 voices, and was last updated 7 years, 2 months ago by AITpro Admin.
-
AuthorPosts
-
jenni101Participant
Thanks so much for your advice – as always your plugin does everything! Amazing! So thankful i found it 🙂
jenni101ParticipantHello,
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!
NitinParticipantpermanent redirect like 301 redirect https://1nine.com/Web/HTTPRedirect, move your domain to 301 redirect.
AITpro AdminKeymaster@ 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.
jenni101ParticipantThanks 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
AITpro AdminKeymaster@ 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.
-
AuthorPosts
- You must be logged in to reply to this topic.