Is there a special way to redirect the site ip address to the domain? I've tried adding to the rewrite section:
Also tried using:
Which should just route all requests that does not start with www to the www, but none of these work.
Code:
RewriteCond %{HTTP_HOST} ^121\.121\.11\.121
RewriteRule ^(.*)$ http://my-domain.com/$1 [R=301,L]
Code:
RewriteCond %{HTTP_HOST} !^www\.my-domain\.com$
RewriteRule ^(.*)$ http://www.my-domain.com/$1 [R=301,L]