How can I redirect HTTP requests made from an iPad?

前端 未结 17 2344
后悔当初
后悔当初 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:13

    Here is a no configuration method for cross device/computer testing of a Mamp Pro Virtual host. The only limitation is you can only test one domain at a time, but for me this is fine when I'm developing. It is really simple however to change between virtual hosts directly in mamp.

    Im running mamp pro 2, mountain lion. My sites folder contains the individual domain folders.

    I found if you choose the specific ip of the local computer under the virtual host 'ip /port' and restart mamp this domain will become the default domain when viewing the localhost computers' ip address, or computer name, across the network.

    For testing purposes this works great across all devices on the network, including the iPad. If you want to test another virtual host you can simply return the ip/port config to "*" and then reassign another domain to the computers ip address and restart.

    The advantage of this simple approach is you can provide access to clients directly to your development sites when your on the same network without having to go through any configuration on their machine.

    Hope this helps anyone else looking for simple solution.

提交回复
热议问题