404 Trick for Web Promotion - A Well-Designed Error Page
(Page 4 of 4 )
When someone gets the generic error message, they will go away and never come back. You will lose visitors and potential customers. It will appear to them that you are not in business.
A well-designed custom error page encourages surfers to remain at your site. Although it's possible to redirect error codes straight to your home page or site map, that doesn't tell visitors what's going on. It's more user-friendly to explain that there was a problem, and then provide some alternatives. Supply a link to your home page or site map, or offer your site's search function if you have one. Redirecting to your home page automatically after showing the error message is also a good idea.
Also it is reasonable for you to record some attributes for error detection and correction purposes, such as the following:
- Date and time of visit.
- Visitor's IP number.
- The exact URL "attempted."
- Visitor's browser Info.
- The referral (Bad Link Used).
Redirecting to the original page
Now the final thing to do is to execute the original page. For this purpose two useful objects (server.transfer and server.execute) are available with IIS 5. We can use any of these objects, but first let me tell you which one is efficient.
One bad thing with server.transfer is that we cannot pass querystring. This is a restriction from IIS. So we need to use session object. Just like this:
<%
Session("Id") = ProductID
Server.Transfer("/product.asp")
%>
However, if your website seen by 10,000 users per day, then 10,000 session objects are created. It wastes bandwidth and slows down server performance.
The next option is server.execute, and I recommend that you use it. By using server.execute, the URL will not change.
<%
transferURL = "/product.asp?id=" + CStr(ProductID)
Server.execute(transferURL)
%>
Now if you type www.mysite.com/DVD-to-pocket-PC.htm into the browser, you will see the same page as the one that is executed by www.mysite.com/product.asp?1d=2.
One interesting point with this phenomenon is that if we use some directory in the URL, it will not affect things and the page will still execute perfectly. Such as:
- www.mysite.com/DVD-to-pocket-PC.htm
- www.mysite.com/DVD-products/version-1.2/DVD-to-pocket-PC.htm
These two URLs execute the same page.
Conclusion
Creation of URLs that are search engine friendly in easy with 404 trick. In most search engines static URLs can get ranking instead of dynamic once. And if these static URLs contain keywords, it is more beneficial. Chosen of suitable and powerful page names is still important in order to get visitor on your website.
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |