Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

401
Visualizações
Force an IFrame to load the mobile version of a website

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>
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

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

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda