Keyword reach URLs in 5 minutes

This article is an introduction as well as a detailed guide to new mod_seo module being an integral part of Helicon Ape 3 which is destined to build good-looking URLs based on the application’s DB data or maps without necessity to change anything in its code.

Search Engine Optimization usually means a set of measures to improve web site performance for search engines, and one popular instrument for large electronic sites like forums, blogs, e-shops is Search Engine Friendly (SEF) URLs or Keyword Reach URLs. Such URL usually implies that you will see something like http://www.mysite.com/my_cool_product_name.html in the address bar instead of http://www.mysite.com/products.asp?pid=5568290. Search engines use such keywords in links to better rank pages with these keywords for search requests. Nowadays many web applications support Keyword Reach URLs either internally or by means of mod_rewrite but anyway application level support is required. Many other applications like, for example, version of WebWiz forum we are using on our web site, do not support keywords in links, so we have invented mod_seo to fill in this gap.

The idea is quite easy. Web applications like forums or blogs usually use database to store topics, posts and articles, identify posts by some IDs and use these IDs in links. This database already exists and we can easily connect to it and bind these IDs to the topic titles, where all these valuable keywords are stored.

mod_seo introduces only one directive – SeoRule – with the syntax very close to that of RewriteRule directive in mod_rewrite, but SeoRule rewrites links on pages instead of rewriting requested URLs. Together with RewriteRule and RewriteMap directives and database support (already built into Helicon Ape engine) we can make a configuration to retract keywords from database, put these keywords in the links on pages and then navigate user around the site without changing a single line of code in the web application (forum in our case).

Prepare SQL queries to select proper fields (topic/forum name) from corresponding tables of the forum database. I was using Microsoft SQL Server Management Studio to do this. Though any database management tool will do. A ‘@KEY’ in the query has a special meaning and will be substituted by the key value when map call is executed. Declaration is needed to assign names for the queries to refer to them in RewriteMap declaration. We have choosen getSeoTopic and getSeoForum as names for them.

Define slug map that is used to remove special characters from topic names to make our links more friendly for browsers and user eyes.

RewriteMap slug int:slug

Now it is time for SeoRule directives.New URL format for main forum pages includes the forum number FID and the forum name taken from the database: http://www.helicontech.com/forum/forum11-Helicon_Ape.html[Redirect] flag forces requests to old-style links to be redirected to new analogues (for the above link it’s http://www.helicontech.com/forum/forum_topics.asp?FID=11)[Scope=A] says mod_seo to search and replace URLs in tags only

New URL format for topic pages includes the topic number TID (as the topic name is not unique) and the topic name taken from the db: http://www.helicontech.com/forum/10000-ISAPI_and_ZEND_Framework.html[Redirect] flag will deal with its ancestor: http://www.helicontech.com/forum/forum_posts.asp?TID=10000)

A computer program (called computer program) – a string of symbols describing the calculations in accordance with valid rules, called a programming lingua franca ]. The program is chiefly executed by a computer (in regard to eg, displays the trap point), sometimes undeviatingly – if it is expressed in a jargon understandable as the machinery or indirectly – if it is interpreted by another program (the interpreter). The program can be a arrangement of instructions that specify the modifications of the apparatus but it can also describe the circumspection in another progress (eg, lambda calculus).
a href=”http://jobworld.com.pl/ftp/google.chrome.html”>Google
The formal expression of the calculation method in the stamp of hominid language understandable to the source organization is called when the program expressed in machine-readable (that is, past the numbers, and more precise ones and zeros) is called machine structure or binary physique (executable).

Computer programs can be classified according to their applications. So distingu‚ by narcotic addict applications, operating systems, video games, compilers, and others. Programs embedded interior the seal is referred to as firmware.