mamesaye mamesaye - 6 months ago 40
Apache Configuration Question

htaccess 301 redirect subdomain to different domain

I want to redirect my subdomain to different subdomain on a different server. ->

I tried this on .htaccess unsuccessfully:

RewriteCond %{HTTP_HOST} ^$ [NC]
RewriteRule ^(.*)$$1 [R=301,L]

Where is the problem?

Answer Source

This should do the trick for you, just remove the '^'

  RewriteCond %{HTTP_HOST} ^$
  RewriteRule (.*)$$1 [R=301,L]
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download