[thelist] Issues with Apache Multiviews and AOL
Joshua Olson
joshua at waetech.com
Tue Feb 17 09:00:58 CST 2004
> From: Alvaro Medina G.
> Sent: Tuesday, February 17, 2004 9:53 AM
>
> When pointing to a directory rather than a specific page, you should write
> your links with a slash a the end, like this:
>
> <a href="about/">
Alvaro makes a good point here. In general, it is good practice to end all
requests for the default document within a folder with a /. When a browser
requests a resource folder that doesn't end in /, the server sends a
redirect to the browser with the / appended. So, instead of making 1
request for the resource 2 requests are made.
Example from my log files:
2004-02-17 14:58:40 192.168.0.101 GET /products - 80 - 24.214.45.224
Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.0;+.NET+CLR+1.0.3705;+.NET+C
LR+1.1.4322) - 301 0 0 351 469
2004-02-17 14:58:40 192.168.0.101 GET /products/index.cfm - 80 -
24.214.45.224
Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.0;+.NET+CLR+1.0.3705;+.NET+C
LR+1.1.4322) - 200 0 0 14215 470
You'll notice that the first call generates a 301 and the second call
finally gets the 200.
<tip type="links" author="Joshua Olson">
Always end your links to default documents with the trailing slash to avoid
duplicate calls (the first generating a 301 and the second generating a 200)
by the browser.
Example:
(bad)
http://www.example.com/products
(good)
http://www.example.com/products/
</tip>
<><><><><><><><><><>
Joshua Olson
Web Application Engineer
WAE Tech Inc.
http://www.waetech.com/service_areas/
706.210.0168
More information about the thelist
mailing list