Web server logs - CHAPTER 5 PERMUTATIONS PATTERN E B V
CHAPTER 5 PERMUTATIONS PATTERN E B V N Figure 5-7. Rearchitected application using the Permutations pattern Using Cookies and HTTP Authentication to Authorize Access Only A problem with URLs is that they associate a user with a URL based on some extra information. It is a bad practice because it does not allow a URL to be copied. For example, I issue the URL http://mydomain.com/~cgross. The tilde character (~) indicates, Please download the content from a user s directory. The user s directory is specified after the tilde character, and in this example is cgross. If I do not happen to be cgross, I can still access the information from cgross. If cgross implements authentication, then I as a user other than cgross need to be authorized to view the contents of cgross. Let s take another example URL: http://mydomain.com/~. Does the HTTP server know which user s directory is being specified? The answer is no, because the HTTP server cannot know who is being referenced. The HTTP server could resolve which user is being referenced by asking the user to log in. So if, for example, I logged in as cgross, the HTTP server could resolve the URL from http://mydomain.com/~ to http://mydomain.com/~cgross. This example is what most websites do. Most websites give you a generic URL that gives user-specific content only if you are authenticated.
Visit our web design programs services for an affordable and reliable webhost to suit all your needs.