I
I
Ilia Berg2015-04-26 06:21:45
PHP
Ilia Berg, 2015-04-26 06:21:45

Are there solutions or practices for redirecting a site to a mobile version of a site?

Faced with the fact that our store needs to be adapted for mobile devices, it’s easier for me to create a mobile version on WordPress ,

but how to do it? so that when determining the php script, the device type is automatically transferred from www.example.ru (simple version) to www.m.example.ru (mobile wordpress)

What do you think about it and how to work with it - mobiledetect.net
b2aaca11fedf4b559926d815044e676d.jpg

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
no_one_safe, 2015-04-26
@no_one_safe

The $_SERVER variable contains information about the user agent of the user. You can analyze this information, and, having determined that the user is sitting from a mobile browser, send him to www.m.example.ru

O
Optimus, 2015-04-26
Pyan @marrk2

media in CSS and you don't have to redirect anything

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question