If you have mobile version of website and want to redirect to appropriate devices this code could be useful.
Add this code to header or index.php file.
window.location='http://www.phpmind.com'";
}
?>
4 thoughts on “How to Redirect URL to Mobile Website ?”
omPost author
Bryan@ – You will have to create “m.example.com” first and then use window.location=’m.example.com’
agen judi ayam
I was excited to discover this site. I need to to thannk you for youjr time just
for this fantastic read!! I definitely liked every bit of it and i also have
you bookmarked to look at new stuff on your
blog.
Bryan
Hi, that code looks perfect but how to maintain path with it? so for example lets say a mobile user opens this link http://www.example.com/about then he should get redirected to m.example.com/about How to go about it?
My brother recommended I would possibly like this website. He used to be totally right. This submit actually made my day. You can not believe simply how so much time I had spent for this info! Thanks!
Bryan@ – You will have to create “m.example.com” first and then use window.location=’m.example.com’
I was excited to discover this site. I need to to thannk you for youjr time just
for this fantastic read!! I definitely liked every bit of it and i also have
you bookmarked to look at new stuff on your
blog.
Hi, that code looks perfect but how to maintain path with it? so for example lets say a mobile user opens this link http://www.example.com/about then he should get redirected to m.example.com/about How to go about it?
My brother recommended I would possibly like this website. He used to be totally right. This submit actually made my day. You can not believe simply how so much time I had spent for this info! Thanks!