Skip to main content

Domain masking URL

Comments

6 comments

  • GOT
    You can add it as an domain alias and it will behave the way you want, assuming you do not use any rewrites in your code or htaccess that push it back to the primary domain.
    0
  • Vinayak
    Use .htaccess file to do that, with following code RewriteEngine On RewriteCond %{HTTP_HOST} ^exampledomain\.com$ [OR] RewriteCond %{HTTP_HOST} ^www\.exampledomain\.com$ RewriteRule ^/?(.*) http://www.exampledomain2.com/$1 [R=301,L]
    0
  • cPanelMichael
    Hello @inteldigital, An Alias is best suited for the scenario you described. You can read more about aliases, including a chart noting the differences between aliases and addon domains, at: Aliases - Version 76 Documentation - cPanel Documentation Thank you.
    0
  • ADG
    how would I do this to point to a subdomain? It works in essence but didn't load the HTML page sitting in the subdomain RewriteEngine On RewriteCond %{HTTP_HOST} ^sub.mydomain\.com.au$ [OR] RewriteCond %{HTTP_HOST} ^www\.sub.mydomain\.com.au$ RewriteRule ^/?(.*)
    0
  • cPRex Jurassic Moderator
    @ADG - I would expect this to work well no matter what type of domain you are redirecting to or from. Can you let me know exactly what "in essence" means? Is this partially working for you?
    0
  • ADG
    @ADG - I would expect this to work well no matter what type of domain you are redirecting to or from. Can you let me know exactly what "in essence" means? Is this partially working for you?

    thx for your reply. I have it working now.
    0

Please sign in to leave a comment.