macos – Is there a technique to change the URL of a mac safari net app as soon as created?

[ad_1]

I can consider two strategies. The primary can be the simplest:

Go to Safari > Settings > Safety.
Disable Javascript. Go to the url you are involved in. It should not redirect, assuming javascript it what’s inflicting the redirection.

Remember to re-enable javascript while you’re achieved!

If that does not work, we’re gonna hijack the area :):

Open the Terminal app

Run this command to flush your DNS cache in order that the system would not already know the right way to discover the vacation spot you need:
sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder

Run this command to quickly add a number entry that macos will use as an alternative of the particular vacation spot:
sudo vi /and so on/hosts
(if you do not know the right way to use vi, use nano as an alternative, or actually any textual content editor)
add this to the underside on a brand new line:
127.0.0.1 the.host.deal with.you.need.to.use
save the file and exit. Word that that is simply the title — like www.google.com and never https://www.google.com/otherstuff

so:
127.0.0.1 www.google.com

Run this to fireplace up a short lived webserver:
mkdir webserver && cd webserver
sudo ruby -run -e httpd . -p 80

What that does is spin up a barebones webserver listening in your native laptop.

You might get a immediate to let it hear on the community – reply sure (I do not know why this immediate occurs since localhost just isn’t reachable exterior of your laptop).

Open Safari, and go to that url you need to use. You must get largely clean web page out of your webserver. At this level you need to be capable to File, Add to Dock…

Make sure to “CTRL-C” to abort the net server and re-edit your /and so on/hosts file to take away that line you added while you’re achieved!

[ad_2]

Leave a Reply

Your email address will not be published. Required fields are marked *