I’m deploying a WordPress blog, but I don’t want to overwrite the current site yet.
public_html/. <– the current site
public_html/wp/. <– the new site
How must my .htaccess look like so I can seamlessly switch from the current site to the new one
so that http://domain.tld shows the new site like it would be directly in the public_html folder
I don’t know whether it applies to your situation, but wouldn’t it be simpler to just do a series of move operations in your FTP client?
/public_html/old//public_html/wpinto/public_html/old/public_html/wpup one leveldone!
You’d have to be very careful when doing the moving of course.
If that won’t work, I don’t know what kind of hosting environment you are in, but the easiest way to do would be to map your domain to
public_html/wpinstead ofpublic_html. That can’t be done in.htaccessthough, you will need some kind of access to the site’s setup.In
.htaccess, you will probably have to use amod_rewriterule that could look something like this (I can’t test this right now so no guarantees.)