What's the difference between these two URLs?
ftp://user#101.101.101.49/folder/request.js
ftp://test.net#ftp.website.net/folder/request.js
(Note that the IP is only for sample.)
Nothing is particularly different. The part before the # is your username. The part after the # is the remote host you're connecting to.
101.101.101.49 is by IP address
ftp.website.net is by hostname
The /folder/request.js is the path and filename you're looking to download.
Related
I have a laravel projct deployed on a virtual machine on GCP and I need to create a subdomain for it based on its url , the url looks like this : 34.90.86.243/questions_bank/public/
but when I wanted to add the url to the data field on google domains I got confused on what type I should use to make this up to work.
see this image
so which type should I choose ? and if there is an other way to do it please tel me
You cannot create subdomains based upon URL paths (/questions_bank/public/).
DNS servers manage subdomain resource records based upon IP addresses (A and AAAA) and CNAMES (which resolve to A and AAAA resource records.
If your goal is to create a subdomain questionsbank as in questionsbank.example.com from the IP address 34.90.86.243, create an A with the Host name questionsbank, Type A, TTL 86400, Value 34.90.86.243.
In your webserver (Apache, Nginx, etc.) you can use URL Rewrite to map subdomains to URL paths.
E.g. I have two backend services, A and B, and I want to forward everything with path
/A* to A and /B* to B - but I want to strip out the /A/ and /B/ before it hits them. So for example /A/api reaches A as /api. Is this possible?
Edit: I specifically want to forward the traffic, not redirect.
I don't think it's possible, what worked for me is simply configuring my backends so that locally I can start them without the context, and then when deployed, a context is added.
I think you can do redirect rewrite rule, this content is for forcing https redirection but I am assuming you can do a redirect to a diff url as well:
https://aws.amazon.com/premiumsupport/knowledge-center/elb-redirect-http-to-https-using-alb/
If your services are separated servers:
Create target group for service A (target_A)
Create target group for service B (target_B)
Add servers to their groups.
Create balancer path rule "If Path is /A/* THEN Forward to target_A: 1 (100%)"
Create balancer path rule "If Path is /B/* THEN Forward to target_B: 1 (100%)"
I want to know the route(all the intermediate servers/routers/etc. and final destination) taken by a query/url to fetch data fetched from a server.
For example: http://coreapi.imagin8ors.org:8080/v1/child/140df552-eba9-42c3-8c9e-6d478637925f/learningpods_new/
Any Online tools or software's to do the same?
Any help is appreciated?
You can use the command traceroute to trace down all the nodes in the path while querying a domain name.
But, please note that the command may fail for URLs containing parameters like the one you have provided in your question. The command takes only the domain name as argument, not complete URL with extra parameters. Example:
traceroute coreapi.imagin8ors.org
and not:
traceroute http://coreapi.imagin8ors.org:8080/v1/child/140df552-eba9-42c3-8c9e-6d478637925f/learningpods_new/
The point to understand here is that the domain name is mapped to a specific source of a resource and the extra parameters after the domain name in a URL is to specify a particular resource from that source. Hence no matter what the full URL is, only the domain name matters for the path to be taken by the packets.
So, given any URL you could safely extract out the domain name and trace the path using traceroute command with the URL to get the path you are looking for.
Hope this helps. Thanks.
Is there a Unique Resource Identifier (URI) schema which allows to uniquely refer to IP addresses and domain names?
For example "http://8o.232.240.50" or "http://supersite.com" are not refering to IP address or a domain name, rather they are refering to some resource which can be accessed via HTTP protocol and it's HTTP path happens to include this given IP address or domain name. Therefore they are more of Unique Resource Locators (URL) than Unique Resource Identifiers (URI) or Unique Resource Names (URN).
What I am looking for are schemas like "mailto:someemai#something.com" for IP addresses and/or domain names.
Something like "domain:supersite.com" and "ip:80.232.240.50".
I could make up schemes like these for my own use, but I am wondering if there isn't something like this already out there. And if there isn't, why?
RFC 4501: Domain Name System Uniform Resource Identifiers
The Domain Name System (DNS) […] is a widely deployed system
used, among other things, to translate host names into IP addresses.
Several protocols use Uniform Resource Identifiers (URIs) to refer to
data. By defining a URI scheme for DNS data, the gap between these
two worlds is bridged. The DNS URI scheme defined here can be used
to reference any data stored in the DNS.
From the examples:
dns:www.example.org.?clAsS=IN;tYpE=A
dns:www.example.org
dns:simon.example.org?type=CERT
dns://192.168.1.1/ftp.example.org?type=A
dns:world%20wide%20web.example%5c.domain.org?TYPE=TXT
dns://fw.example.org/*.%20%00.example?type=TXT
According to the syntax, it should be possible to use the dnsauthority with an empty dnsname. dnsauthority takes a host as defined in RFC 3986, which says:
host = IP-literal / IPv4address / reg-name
So it should be possible to use domain names as well as IP addresses (an empty dnsname "is to be interpreted as the root itself").
I have tried build app like whois domain tool site.
On form have one text_field and I want field only input with domain name and ip address.
Example domain name : domain.com (without http://www. or https://www. or subdomain.)
Example Ip address : 4.4.4.4
I want validate using regex, I have create this regex (demo on rubular)
([a-zA-Z0-9]+(\.[a-zA-Z0-9]+)+.*)
But that is not clean, www. or subdomain still accepted.
Check out this built in Ruby class Resolv::IPv4::Regex for IP validation
and this URI for domain names.
IP Adress:
/^([1-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3}(?:\-([1-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]))?$/