How to use mod_rewrite for ip instead of domain name.
for domain i am using like this
RewriteCond %{HTTP_HOST} ^treasherlocked.in
RewriteRule (.*) http://www.treasherlocked.in/$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://www.treasherlocked.in/ [R=301,L]
for ip i am using like this , but it is not wokring
RewriteCond %{HTTP_HOST} ^118\.139\.160\.117
RewriteRule (.*) http://118.139.160.117/$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://118.139.160.117/ [R=301,L]