I am running multiple tld's using domain alias from my hosting account. When my site gets control it checks the $_SERVER['HTTP_HOST'] to see if it's what's defined in my allowed tld table and if so updates the CMS core with the tld domain name and other details used by the CMS. The aliases address appears as expected in the address bar. Works great!
I have been looking at other options outside of domain aliasing, because of email issues and some people may not have the capability to define a domain alias easily.
-I've ruled out frame(masked) forwarding as this won't work with paypal and other payment gateways I suspect. Nor is it SEO friendly at all, etc.
-For regular 'parked' unmasked forwarding I do not receive the original url 'referrer', but will test again.
:DMy question is how can I use a 301 redirect and keep the tld coming into the the main domain in the address bar? I also need to check if it's a redirect and that the referrer is in my tld table, and if so execute code like I do for alias.
i.e. .htaccess redirect in domainone.xx to domaintwo.xx with domainone.xx still in the address bar.
here is the example I've used for 301's that I don't want the redirected site to display in the receiving domain.
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.old-domain.com$ [NC]
RewriteRule ^(.*)$ http://www.new-domain.com/$1 [R=301,L]
I really appreciate review of the freaks.