Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Redirect users if on desktop to new URL Re: Redirect users if on desktop to new URL

#132287
pixelgrid
Participant

you can use user agent detection with php on the serverside or with javascript on the client side.
With php the users user agent is stored in

$_SERVER

you can go with regex or strpos and testing for the devices you want and redirect with

header(‘Location: http://example.site.com/’)

Respsonsive design is always better though