3 Url Rewrite For Developers m3 Url Parts Slides
3 Url Rewrite For Developers m3 Url Parts Slides
Scott Forsyth
weblogs.asp.net/owscott
@scottforsyth
[email protected]
In this Module
Discovery
HTTP Headers
Five Core URL Parts
Discovery
HTTP Headers
Five Core URL Parts
http(s)://www.localtest.me:80/events/article.aspx?id=123
Name Example Server Variable Notes
Domain Name www.localtest.me {HTTP_HOST} IP if visited by IP
Port 80 {SERVER_PORT} 80 or 443 if not shown
Query String id=123 {QUERY_STRING}
Protocol http {HTTPS} ‘on’ or ‘off’
Match URL events/article.aspx Match URL in Never a beginning
rule slash
URL (condition) /events/article.aspx {URL} Always a beginning
slash
Path with query /events/articles.aspx?id=1 {REQUEST_URI} Always a beginning
string 23 slash. Includes query
string.
Entire URL http://...article.aspx?id=12 {CACHE_URL} Includes the port,
3 even if not shown in
browser.
http(s)://www.localtest.me:80/events/article.aspx/postpath/?id=123
Discovery
HTTP Headers
View Server Variables
<%
For Each var As String in Request.ServerVariables
Response.Write(var & ": " & Request(var) & "<br>")
Next
%>
Additional Server Variables (Page 1 of 2)
Also see: http://tinyurl.com/servervars
Discovery
HTTP Headers
{HTTP_HOST}
{HTTP_ACCEPT_ENCODING}
{HTTP_USER_AGENT}
Three Rules when Naming HTTP Headers
Discovery
HTTP Headers