Changing where a url points to

Report
Posts
1004
Registration date
Saturday January 17, 2015
Status
Moderator
Last seen
November 27, 2020
-
Posts
9523
Registration date
Friday October 30, 2015
Status
Moderator
Last seen
March 23, 2021
-
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 replies

Posts
9523
Registration date
Friday October 30, 2015
Status
Moderator
Last seen
March 23, 2021
1,056
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
Thank you

Glad we were able to help! Love us? Write us a review! Rate CCM

CCM 2942 users have said thank you to us this month

Posts
1004
Registration date
Saturday January 17, 2015
Status
Moderator
Last seen
November 27, 2020
124
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.
Posts
9523
Registration date
Friday October 30, 2015
Status
Moderator
Last seen
March 23, 2021
1,056 >
Posts
1004
Registration date
Saturday January 17, 2015
Status
Moderator
Last seen
November 27, 2020

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.
Posts
1004
Registration date
Saturday January 17, 2015
Status
Moderator
Last seen
November 27, 2020
124 >
Posts
9523
Registration date
Friday October 30, 2015
Status
Moderator
Last seen
March 23, 2021

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. :^)
Posts
9523
Registration date
Friday October 30, 2015
Status
Moderator
Last seen
March 23, 2021
1,056 >
Posts
1004
Registration date
Saturday January 17, 2015
Status
Moderator
Last seen
November 27, 2020

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!
Hey Brian its mark. It is called a host file.
Posts
1004
Registration date
Saturday January 17, 2015
Status
Moderator
Last seen
November 27, 2020
124
Thanks Mark,

Can you private message me?

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!