I usually don’t do posts that include code, but this trick it just too cool.
The code below is for your .htaccess file. You would want to use this whenever you are working on a site and you want to redirect the site elsewhere while you are working on it.
So, in this case we duplicated the site on a subdomain while we worked on the main site. Then we put in these redirects to direct everyone looking for the home page & anyone who reached a 404 page to be redirected.
What’s great about this is that you can still work on your site as long as you know the right URL for the page you are looking for.
# TEMPORARY REDIRECT redirect 302 /index.html http://youwantthemtogohere.com ErrorDocument 404 http://youwantthemtogohere.com
Want More out of WordPress?
I can show you how to get more traffic, make WordPress do amazing things, and how to make more money with your website by converting your visitors into customers. Click the button to the right to get a free estimate.