How can I redirect HTTP requests made from an iPad?

前端 未结 17 2403
后悔当初
后悔当初 2020-12-12 09:53

Since on an iPad we cannot edit the hosts file (without jailbreaking), how can we arbitrarily redirect web traffic to another url?

This would be important for someth

17条回答
  •  不知归路
    2020-12-12 10:24

    Nice tutorial to do so: http://egalo.com/2012/05/29/testing-mac-web-site-using-local-hostname-on-mobile-device/

    An other way is to connect the IPad via Local Hotspot with my MAC OS X and establish an port-forwarding to the development VM. To achieve this I'v done the following Steps:

    • on MAC OS X create a WLAN-Hotspot Link how to do this
    • connect the iPAD with the Hotspot-WLAN (on iPAD >> Settings >> WLAN)
    • Add the ServerAlias to the local development-VM (details below)
    • establish ssh-portforwarding
      ssh -NL :::80
    • int the iPADs Browser open the page with the IP
      :

    Where to get 'IP-of-hotspot-host':

    After created hotspot there is a WLAN-Point in
    MAC OS X system settings >> Network >> WLAN

    Adding the ServerAlias:

    At my development-VM (Apache2) in /etc/apache2/sites-available/dkr.dev.local I had to add the following:

      
        ...  
        ServerAlias   
        ...  
    

提交回复
热议问题