I'm currently trying to setup a website on free hosting, but use the "branded" URL registered with another provider. I've already tried switching NS but the free hosting NS is very restrictive (Doesn't allow TXT records).
I'm back with the URL registrar, and I've got a URL redirect to the "ugly" URL at free hosting. I've already tried to make the redirect masked, but I lose all the file names, and many meta tags due to the <iframe>. Also any files that aren't .html are served (e.g. sitemap.xml).
Is there anyway I can solve this using .htaccess on the free hosting side? - that's the only thing I have access to (i.e. no access to httpd)
I've tried all these "pairs" of rewrites but with no success (I'm still new at rewrites so they might not be completely correct)
#RewriteEngine On
#RewriteRule "^(.*)ugly.url.com(.*)$" "$1www.my-brand-url.com$2" [L,R=302]
#RewriteCond %{HTTP_HOST} ugly.url.com [NC]
#RewriteRule ^(.*)$ http://www.my-brand-url.com/$1 [L,R=302]
RewriteRule ^ugly.url.com/(.*)$ http://www.my-brand-url.com/$1 [L,R=302]
ServerName ugly.url.com
ServerAlias www.my-brand-url.com