A : hi friend use these line of code;RewriteCond %{HTTP_HOST} ^2\.2\.2\.2
RewriteRule (.*) http://example.com/$1 [R=301,L]Replace 2\.2\.2\.2 with your IPV4 ipaddressReplace http://example.com with your domain where you want to redirect;thanks
A : Hi, replace your .htaccess with this, this will works for youTested.RewriteEngine OnRewriteBase /RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^(.*)$ index.php/$1 [L]RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]