I need to load a mobile version of a website inside an iFrame of a webpage i'm building, the URL is this
https://m.calcionapoli24.it/diretta/spalletti-napoli-spartak-mosca-conferenza-n495703.html
but there is an automatic redirect to the desktop version of URL
https://www.calcionapoli24.it/diretta/spalletti-napoli-spartak-mosca-conferenza-n495703.html
How can avoid the redirect? How can i force the IFrame to load the mobile version?
Change User-Agent? PHP Curl? Javascript AJAX?
the code is quite basic
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
iframe {
width: 750px;
max-width: 750px;
height: 1334px;
margin: 0 auto;
border-style: none;
border-color: inherit;
border-width: 0px;
display: block;
}
</style>
</head>
<body>
<div>
<iframe src="https://m.calcionapoli24.it/diretta/spalletti-napoli-spartak-mosca-conferenza-n495703.html"></iframe>
</div>
</body>
</html>
You can prepend a query parameter in the url ex ?from_frame=1
Then catch this rule from an .htaccess file and make an .htaccess internal redirect to the mobile version of the website