Home > database >  Force an IFrame to load the mobile version of a website
Force an IFrame to load the mobile version of a website

Time:09-29

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?

CodePudding user response:

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

CodePudding user response:

@Agamemnon i can't understand in which way a .htaccess file can have effect to an i

  • Related