Difference between revisions of "Subdomain redirection"
Jump to navigation
Jump to search
Tags: Mobile web edit, Mobile edit |
|||
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | Using Nginx: https://stackoverflow.com/questions/45318758/nginx-variable-for-subdomain | |
− | server { | + | |
+ | [[server]] { | ||
[[listen]] 80; | [[listen]] 80; | ||
[[server_name]] ~^(?<my[[subdomain]]>.+)\.example\.com$; | [[server_name]] ~^(?<my[[subdomain]]>.+)\.example\.com$; | ||
Line 8: | Line 9: | ||
== Related terms == | == Related terms == | ||
* [[URL redirection]] | * [[URL redirection]] | ||
+ | * <code>[[nginx -t]]</code> | ||
+ | * <code>[[systemctl restart nginx]]</code> | ||
+ | * [[Regular expressions]] | ||
+ | * [[Lambda@Edge]] | ||
+ | * [[rewrite]] | ||
== See also == | == See also == | ||
* {{Nginx}} | * {{Nginx}} | ||
* {{DNS}} | * {{DNS}} | ||
− | * {{redirection}} | + | * {{URL redirection}} |
[[Category:Web]] | [[Category:Web]] |
Latest revision as of 10:48, 21 June 2023
Using Nginx: https://stackoverflow.com/questions/45318758/nginx-variable-for-subdomain
server { listen 80; server_name ~^(?<mysubdomain>.+)\.example\.com$; return 301 http://example.com/$mysubdomain$request_uri; }
Related terms[edit]
See also[edit]
- Web server: Nginx:
/etc/nginx/nginx.conf
,nginx -t
, Nginx logs, Nginx change log, PHP,php-fpm
, Let's encrypt, Nginx directives, Reverse Proxy, Configure HTTP redirection Nginx, Return,proxy_pass (Reverse proxy)
,ngx_http_rewrite_module
,/etc/nginx/sites-enabled/
,error.log
,access.log
,/nginx status
, AIO - DNS: Linux DNS, IP,
systemd-resolve
,/etc/hosts
,whois
, Domain registrar,dig
,host
,nslookup
,scutil --dns
dnsmasq
,bind
,delv
,.local
,.internal, .onion
, FQDN, TTL,/etc/resolv.conf
,/etc/systemd/resolved.conf
,dscacheutil
(macOS),hostname, hostnamectl
,bind
,resolvectl status
, DNS sinkhole, Domain name server, LLMNR, Resource records:MX, TXT, NS
, CAA, SSHFP, Apex, CNAME, Wildcard DNS records, Subdomain, /etc/nsswitch.conf,1.1.1.1
,8.8.8.8, CoreDNS, dnsPolicy:
, Google Public DNS, DNS caches, Kubernetes ExternalDNS, DNS forwarding, IDNA2008, DNS-1035, Domain name registrars, Split-view DNS, Pi-hole, NextDNS - URL redirection, Subdomain redirection, Lambda@Edge: HTTP redirect using lambda handler, Redirect: HTTP status codes 3xx
Advertising: