Looking for best way to handle going Live with an Addon Domain when production site is built within a subdirectory

Permalink
I have been building a new site for a client in a subdirectory on their main hosting account in Bluehost. They've finally purchased a new domain so we can go live. I plan to do as I always do and add it as an addon domain and point it to the directory where the C5 production site resides. In preparation, I've turned OFF URL Redirects, all caching, and cleared the cache as well. I noticed on a previous website built this same way that you can still access the website via the old path on top of the correct path with the correct domain. How do I prevent the old path? You used to just go to the site.php file and modify it there. Where is that handled now? Example:www.www.olddomain.com/productiondirectory... tohttp://www.livewebsite.com. Both of these would show the same website. How do I make sure the old production path redirects to the live website?

barkingtuna
 
jasteele12 replied on at Permalink Best Answer Reply
jasteele12
You can setup a 301 permanent redirect in .htaccess

RewriteEngine on
RedirectMatch 301 /productiondirectory/(.*) http://www.livewebsite.com/$1

The above (untested) should work regardless of concrete5 version (or any other software).