Changing where a url points to

Closed
BrianGreen Posts 1005 Registration date Saturday January 17, 2015 Status Moderator Last seen September 30, 2021 - Nov 22, 2020 at 05:54 PM
HelpiOS Posts 14515 Registration date Friday October 30, 2015 Status Moderator Last seen November 15, 2024 - Dec 3, 2020 at 08:06 AM
Hi guys.

I would like to impose on your good will again.

I seem to recall from the dim and distant past that is it possible to redirect a website to another one just on one pc. It was by editing the page file I think. What I want to do is just on my PC - if I type in www.ababab.com into my web browser I want it to go to www.cdcdcd.com (these websites are for examples only). What is the file and how do I edit it to do as I need please.

I realise that this could be used maliciously, so please answer as a private message.

2 responses

HelpiOS Posts 14515 Registration date Friday October 30, 2015 Status Moderator Last seen November 15, 2024 1,867
Updated on Nov 23, 2020 at 06:21 AM
Hi,

I understand your concerns about malicious use, but the steps will only be performed with Windows and will require administrator rights. This subject will also be useful to other people looking for the same solution as you.

To redirect an URL to another URL as in your example, you can edit the Windows Hosts file. This method doesn't require any third-party tool.

First of all, open the Start menu, search for Notepad and choose to run it as administrator. Next in Notepad, go to File > Open.

Navigate to C:\Windows\System32\drivers\etc then select the Hosts file. Choose All files next to "File Name" to see it.

In the Hosts file, type the IP address of the site that you'd like to see and next to it, add the URL of the site that will redirect you:
  • 111.222.33.444 example.com


To find the IP address, open Command Prompt and launch a ping command. Type
ping example.com
and you'll get the IP address of the site.

In case you want to reset the Hosts file to revert back to its default settings, follow the instructions described on this page, or you can simply remove what you added previously.
1
BrianGreen Posts 1005 Registration date Saturday January 17, 2015 Status Moderator Last seen September 30, 2021 149
Updated on Nov 24, 2020 at 12:11 PM
Hi HelpiOS,

I do thank you for your input, but I'm afraid I can only give you 1/2 of the virtual pint I normally buy for the people who help me as it's only 1/2 the answer I need. You are absolutely right - it is the host file. But ...

I want it to redirect to (to keep the anomicity so I don't put anyones nose out of joint) www.cdcdcd.com/?1234

Is there a way to do that? The command line approach does not find the host.

If you can find that then you get the other half of your virtual pint.
0
HelpiOS Posts 14515 Registration date Friday October 30, 2015 Status Moderator Last seen November 15, 2024 1,867 > BrianGreen Posts 1005 Registration date Saturday January 17, 2015 Status Moderator Last seen September 30, 2021
Nov 25, 2020 at 05:17 PM
Thanks for your offer BrianGreen, but I prefer a coffee!

The Hosts file doesn't allow that... fortunately, I found these browser extensions:

These extensions will allow you to redirect to another page of the same URL. You can hide their icons from the browser's menu to make them discreet.
0
BrianGreen Posts 1005 Registration date Saturday January 17, 2015 Status Moderator Last seen September 30, 2021 149 > HelpiOS Posts 14515 Registration date Friday October 30, 2015 Status Moderator Last seen November 15, 2024
Nov 27, 2020 at 03:47 PM
Thanks HelpiOS,

On first sight I couldn't get "Redirector" to work, but I will have a play and try to follow the directions in the help bit. It might be that I need to restart the browser, but I have too much open that I need at the moment. I will let you know how I get on.

As you don't drink virtual beer I will have to drink it for you before it goes flat. I'll get you a virtual coffee in a short while ... if I can make it to the bar after drinking your beer. :^)
0
HelpiOS Posts 14515 Registration date Friday October 30, 2015 Status Moderator Last seen November 15, 2024 1,867 > BrianGreen Posts 1005 Registration date Saturday January 17, 2015 Status Moderator Last seen September 30, 2021
Dec 3, 2020 at 08:06 AM
It didn't work for me the first time I used it either, but I just found out how it works.

On the configuration page of "Redirector", click Create new redirect, then fill out the fields as follows:

Good luck!
0
Hey Brian its mark. It is called a host file.
0
BrianGreen Posts 1005 Registration date Saturday January 17, 2015 Status Moderator Last seen September 30, 2021 149
Nov 23, 2020 at 03:42 PM
Thanks Mark,

Can you private message me?
0