-2

How can someone access my site with different domain name? i.e. example.com displayed mysite.com actually... (at least, i want for local PC purposes).

or how to modify REQUESTS using browser? are there any add-ons?

p.s. i want to visit example.com and it opened mysite.com, such as HTTP_HOST command displayed example.com

closed as unclear what you're asking by schroeder May 14 '16 at 23:48

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    I do not understand what you are asking. Are you looking to change DNS mappings? The string in the browser's URL bar? Some part of the HTTP request? Can you try to clarify? – Neil Smithline May 14 '16 at 16:30
1

It looks like there are a few questions here, so I will try and split it up to what I think you mean.

how can someone access my site with different domain name?

Many domain registration services offer forwarding / redirection facilities, placing the website (say example.com) in an iframe. This would allow example2.com to appear as though it was example.com, very basic checks such as viewing the source code of example2.com would clearly show that it isn't the original website.

i.e. example.com displayed mysite.com actually... (at least, i want for local PC purposes).

Locally, you could set up DNS so that you type in a domain and it'll send you to the original website. If you change your DNS settings to your own DNS server, it will take precedence.

or how to modify REQUESTS using browser? are there any addons?

Unfortunately, I'm not to sure about such options for this.

If you could be a bit more specific about what you're after, I can try and narrow it down.

1

The most general way would be to setup a proxy webserver running at mysite.com that takes HTTP requests to mysite.com and forwards them to example.com waits for the response from example.com and then returns that information to the browser who requested info from mysite.com.

This is pretty straightforward to do with nginx (a free open source web server). See for example this guide on creating a proxy webserver.

Note in some situations you may be able to accomplish this by just altering a DNS record (by setting up a CNAME record that points mysite.com to example.com which will make mysite.com have the same IP address as example.com. However, its common for modern webservers to require the hostname to be specified to process a HTTP request; e.g., if the same IP address serves several domains. For example, if you look up security.stackexchange.com's IP address (dig security.stackexchange.com in linux) find an IP address like 104.16.119.182 that belongs to the cloudflare content delivery network (CDN), if you try going to http://104.16.119.182 you'll get an error saying you need to give a valid Hostname in your HTTP request (the example.com part).

  • Yes, you can modify HTTP requests in the browser; e.g., look into javascript extensions. Granted, now I am getting the idea that you really just want to modify a users /etc/hosts or do an ARP poisoning attack to get someone who tries going to http://example.com instead of going to the real IP it resolves to your fake local machine. – dr jimbob May 15 '16 at 16:25

Not the answer you're looking for? Browse other questions tagged or ask your own question.