Hi all, I am new to this and hope you can help
I have a site e.g. www.example.net and want the site to go to the following URL www.example.com, but displaying www.example.net
I found this code that appeared to work, but in fact redirected to www.example.com displaying www.example.com as well (hence did not achieve what i wanted)
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.example.net
RewriteRule ^(.*) http://www.example.com/$1
On top of that I found out that the above rule does not work on Iphone or IPAD
Hence I added the following and came up with the following HACK (not pretty)
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} iPhone
RewriteRule .* http://www.example.com
RewriteCond %{HTTP_HOST} ^www.example.net
RewriteRule ^(.*) http://www.example.com/$1
I do not have an IPAD but apparently it worked for the IPAD (BUT not the IPHONE) but again displayined www.example.com in the URL.
In short rewrite www.example.net to www.example.com on all types of devices
Thanks v much
A
[edited by: Ocean10000 at 4:09 pm (utc) on Nov 20, 2014]
[edit reason] examplified [/edit]