Editing URL redirection
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 37: | Line 37: | ||
==== nginx rewrite ==== | ==== nginx rewrite ==== | ||
− | [[Nginx]] has an integrated http | + | [[Nginx]] has an integrated http rewrite module,<ref name="T6lN6" /> which can be used to perform advanced URL processing and even web-page generation (with the <code>return</code> directive). A showing example of such advanced use of the rewrite module is [http://mdoc.su/ mdoc.su], which implements a deterministic [[URL shortening]] service entirely with the help of nginx configuration language alone.<ref name="ltnoQ" /><ref name="sjHzb" /> |
For example, if a request for <code>[https://www.dragonflybsd.org/cgi/web-man?command=HAMMER§ion=5 /DragonFlyBSD/HAMMER.5]</code> were to come along, it would first be redirected internally to <code>/d/HAMMER.5</code> with the first rewrite directive below (only affecting the internal state, without any HTTP replies issued to the client just yet), and then with the second rewrite directive, an [[HTTP response]] with a [[HTTP 302|302 Found status code]] would be issued to the client to actually redirect to the external [[Common Gateway Interface|cgi script]] of web-[[man page|man]]:<ref name="y0ZUF" /> | For example, if a request for <code>[https://www.dragonflybsd.org/cgi/web-man?command=HAMMER§ion=5 /DragonFlyBSD/HAMMER.5]</code> were to come along, it would first be redirected internally to <code>/d/HAMMER.5</code> with the first rewrite directive below (only affecting the internal state, without any HTTP replies issued to the client just yet), and then with the second rewrite directive, an [[HTTP response]] with a [[HTTP 302|302 Found status code]] would be issued to the client to actually redirect to the external [[Common Gateway Interface|cgi script]] of web-[[man page|man]]:<ref name="y0ZUF" /> | ||
Line 57: | Line 57: | ||
* https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/quickref-s3.html#scenario-s3-bucket-website | * https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/quickref-s3.html#scenario-s3-bucket-website | ||
* https://aws.amazon.com/premiumsupport/knowledge-center/redirect-domain-route-53/ | * https://aws.amazon.com/premiumsupport/knowledge-center/redirect-domain-route-53/ | ||
− | |||
== Related terms == | == Related terms == | ||
Line 65: | Line 64: | ||
* Nginx [[return]] using [[subdomain redirection]]s | * Nginx [[return]] using [[subdomain redirection]]s | ||
* [[Lambda@Edge]] | * [[Lambda@Edge]] | ||
− | |||
− | |||
− | |||
− | |||
− | |||
== See also == | == See also == | ||
− | * {{ | + | * {{nginx}} |
− | + | * {{web}} | |
+ | * {{HTTPS}} | ||
[[Category:Web]] | [[Category:Web]] |
Advertising: