I have been building a website that should be launching in approximately 1 month and the site is almost done, with one large exception: it’s on the wrong domain.
On the main page of our domain (www.example.com) there is an under construction page which is collecting email addresses, as well as just a general landing page. Meanwhile at subdomain.example.com I have built the website.
The question then is: is there a way that I can keep the under construction landing page up but also move the wordpress site from subdomain.example.com to run in the background on example.com somewhere. My concern is that when the site is finally ready and if I just ftp all the wordpress files to example.com there will be issues and I want to hammer those out before launch.
Yes, you can, by using .htaccess to filter the access.
Just put this in your .htaccess (before all other instructions you might have in there) and everyone that doesn’t have that IP will be redirected to soon.html.
This way you can keep developing on the same path that the final website will reside.
Notes:
This will filter all other IPs, including pingbacks from third party entities. If you’re using PayPal IPN or any other gateway that needs to comunicate with your website you will have to manually add that IP to the .htaccess (as explained on the code itself).
Hopefully this will help you.