How do I redirect www and non but not IP
- by Chad T Parson
I am trying to redirect www.domain.com or domain.com to www.domain.com/temp.html
I am using the following code:
RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^/?$ "http\:\/\/www\.domain\.com\/temp\.html" [R=301,L]
That works however I do not want to redirect IP. So if someone types in the static IP of the domain then I do not want them to be redirected to www.domain.com/temp.html
Anyone have the code to take care of this?