Website Promotion
  Home arrow Website Promotion arrow Page 3 - 404 Trick for Web Promotion
SEO Chat Forums  
Choosing Keywords  
Google Optimization  
Link Trading  
MSN Optimization  
Search Engine News  
Search Engine Spiders  
Search Optimization  
Web Directories  
Website Marketing  
Website Promotion  
Website Submission  
Yahoo Optimization  
SEO Tools
Adsense Calculator
AdSense Preview
Advanced Meta-Tags
Alexa Rank Tool
Check Server Headers
Class C Checker
Code to Text Ratio
CPM Calculator
Domain Age Check
Domain Typos
Future PageRank
Google Dance
Google Keywords
Google Search
Google Suggest
Google vs Yahoo
Indexed Pages
Keyword Cloud
Keyword Density
Keyword Difficulty
Keyword Optimizer
Keyword Position
Keyword Typos
Link Popularity
Link Price Calculator
Meta Analyzer
Meta Tag Generator
Multiple Link Popularity
Page Comparison
Page Size
PageRank Lookup
PageRank Search
Robots.txt Generator
ROI Calculator 
S.E. Comparison 
S.E. Keyword Position 
Site Link Analyzer 
Spider Simulator 
URL Redirect Check 
URL Rewriting 
Dedicated Servers  
Moblin 
JMSL Numerical Library 
IBM® developerWorks 
Sun Developer Network 
SEO Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
WEBSITE PROMOTION

404 Trick for Web Promotion
By: Burhan Khan
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 9
    2004-12-27

    Table of Contents:
  • 404 Trick for Web Promotion
  • Setting up IIS for custom errors
  • Linking
  • A Well-Designed Error Page

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    404 Trick for Web Promotion - Linking


    (Page 3 of 4 )

    What do you do to switch from one product to another product? Certainly, we create a link and get the product id from the database and place it in querystring. Such as:

    <a href="product.asp?id=<%=ID%>"><%=Product_name%></a>

    But now you should change it. Instead of passing the product id with querystring, you need to get the corresponding PageName and redirect to that page. Such as:

    <a href="<%=PageName%>"><%=Product_name%></a>

    It will now redirect to:

    www.mysite.com/DVD-to-pocket-PC.htm

    At this stage we get a static looking URL. That page does not really exist, but we code it in 404.asp to handle it and execute the original page.

    Creation of the 404.asp page

    Now we need to create the 404.asp page to handle all 404 page not found errors. For this purpose we need to get the name of the page that had the 404 errors. As I already say, IIS sends the name of that file with querystring. So we need to get querystring.

    <%
    ' Getting page name
    dim PageName
    PageName = Request.ServerVariables("QUERY_STRING")
    %>

    Here we get the page, such as DVD-to-pocket-PC.htm, in the PageName variable. Now we have to search the database for this page, and get the product id corresponding that page. It can be done as:

    <%
    ' Product id
    dim ProductID
    set obj = Server.CreateObject("ADODB.RecordSet")
    obj.Open "select ID from TABLE_NAME where PageName = '"&PageName&"' ", DBCon

    if not obj.EOF then
    ProductID = obj.Fields("ID")
    REDIRECTING TO ORIGNAL PAGE
    Else
    CODE FOR PAGE NOT FOUND
    End if
    %>

    We simply get the ID and store it in ProductID. If that page does not exist in our database, it means it is really a 404 error. So we need to inform the user that this page does not exist; please try other pages. If possible, give a search box so that the user can search for the desired product from your website.

    More Website Promotion Articles
    More By Burhan Khan


       · Whenever I use the char ? in an url,like products.asp?id=2 it says:...
       · I've recently started exploring the use of this myself and ran into problems with...
       · Nice to see comments from you. :)I did not test it under IIS 5. I come to know...
       · Hi'It seem to me a good solution and we at pcline www.pcline.co.il start working...
       · <% Session("Id") = ProductId Server.Transfer("/product.asp") %>Yes but...
     

    WEBSITE PROMOTION ARTICLES

    - Protect Your Online Reputation
    - SEO Clients to Avoid
    - Short is Sweet for Web Copy Writing
    - Choosing the Domain Name of Your Dreams
    - Thwarting Content Theft
    - Book Review: The Open Brand
    - Seven Important Qualities for Good Linkbait
    - Creative Advertisements: Psychology of Winni...
    - Making Social Media Optimization Work for You
    - Responding to Negative Publicity Online
    - Creative Advertisements: the Psychology of F...
    - Take Charge of Your Online Reputation
    - Optimizing Your Press Releases
    - Building Linkbait? Do Your Homework
    - Is Linkbait Good or Bad?






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway