I have 2 domain names that I would like to direct to the same website.
Is it possible to show in the address the domain name they used to get to the site?
e.g.
if a user followed a link for A.com/URL the address bar shows A.com/URL
if a user followed a link for B.com/URL the address bar shows B.com/URL
Thanks in advance
Chris
Yes, you can.
Just resolve two domain to the same IP address.
Related
I installed the YOURLS to a domain say 'https://demo.app' and I want to short link with the domain 'https://demo.io'. I tried it with 'Yourls-Swap-Short-Url' but can't figure it out. Any Idea
Is it possible to change the address of a link on different countries?
I am creating a website for a non-profit, and the donations are made through another website(classy).
I have two pages in Classy, one for United States, and one for Canada and the user needs to choose one link to click.
I would like to make the link change automatically if the user is either in US or Canada. Is it possible?
When can I find more information about it?
You should use some functionality which is able to recognize country from IP address, for example geoip gem and then make condition which link should be displayed
Sorry, this may come across as a bit vague but how would go about and displaying a different logo of an organisation based on where the site is opened from. For example, the organisation would want their official South African logo to be displayed when the site is opened in South Africa, and another official logo when it is opened in Kenya or Ghana for example.
Would the site simply have to be hosted in more than one server...can't think of any other possible way?
To find country first you find Ipaddress
string Ipaddress= HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
Using Ip address you can find location as follows
using (var wc = new WebClient())
{
string output = wc.DownloadString(String.Format("http://api.hostip.info/?ip={0}&position=true", ipaddress));
}
Output is in XML format and it will contain a countryName tag
I would have this as a comment .Since, I don't have enough reputations, I am posting as an answer.
This link would be useful to detect the country and change the logo based on the country in your logic.
Detect/estimate country of a http-request in ASP.NET
Adding the contents of the link, since the link may expire.
You can use one of available web services to match an incoming request to a country.
Otherwise you may decide to grab the MaxMind database file (GeoLite Country), read from this file in your application and perform a match. Thus you will be independent from a third-party service, only pulling regularly updates for the database file.
Also check out similar questions:
Geolocation web service recommendations
Know a good IP address Geolocation Service?
In a very short, in market so many vendors are there, who are tracking geolocation, One of them is google API.
https://www.googleapis.com/geolocation/v1/geolocate?key=YOUR_API_KEY
You can generate your own API_KEY.
Hope this post will helps you. :)
So I have brought 2 domain names for my new business one is .org through Google and the other is .co from Pop! is there any way that I can link the two so if someone was to go to the .org page they would be automatically directed to the .co url? Thanks :)
yes, there are a couple ways, but easiest would be to configure your domain forwarding. I assume you're using google domains? I wish I could help more, but I don't have an invite to google domains, so I can't provide links to their docs...there seems to be a link right off their splash page, though.
You could add meta tags to your page for redirection (example: meta http-equiv="refresh" content="0; url=http://yourdomain.com/") , but since you mentioned using Google domains, try this out https://support.google.com/domains/answer/4522141?hl=en
I have a page that lists various urls and I am using verify_exists in my model. This worked splendidly except for one address. I can visit the link in question at the url given to me but each time I enter it into the admin it tells me the url does not exist. I had a hundred or so links that all worked except for this one.
Does anyone know why this could be happening? Could it be that the actual url is forwarded or something to that affect?
I am not sure about django specifically, but many link checkers do not set a user-agent when they run a link check and many websites block requests with no user agent.
Wikipedia blocks requests with no user-agent, so you can check if that is the problem by trying to create a link to Wikipedia and checking if you get an error.