Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to forward anyone going to subdomain.old-domain.com:8014 to this new address subdomain.new-domain.com:8000/subdirectory (note a different domain AND different port PLUS a subdirectory)

Is it possible in a web host (such as Bluehost) using cPanel DNS Editor or some form of URL redirection with port redirect included?

share|improve this question

It depends if Bluehost allows port redirection using an .htaccess file, try this:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^subdomain.old-domain.com$ [NC]
RewriteCond %{SERVER_PORT} ^8014$
RewriteRule ^(.*)$ http://subdomain.new-domain.com:8000/subdirectory/$1 [R=301,L]
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.