Redirect in .htaccess for subdomain

  jatex 15:39 14 Feb 2014

I am trying to redirect to

I have this in the .htaccess file in the root directory at the moment:

RewriteEngine On RewriteCond %{HTTP_HOST} !$ [NC] RewriteRule ^(.*)$ click here [L,R=301]

This is not working. Any suggestions?

  LastChip 00:01 24 Feb 2014

You've set your rule in the negative and the condition site value is not escaped.

Try substituting the ! for a ^ and escape the periods (full stops) only in the condition. That is, place a backslash (3) in front of each period for the site only -

I tried to show you, but this site won't let me use those characters. It sees it as code (which it is) and blocks it.

DO NOT escape the rule.

I'm also assuming, your server supports mod_rewrite.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Honor 9 Lite review

How Sam Falconer transforms science and geology into digestible, elegant illustrations

HomePod review

Les meilleures séries Netflix (2018)