Skip to main content



PAGES : [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5

Handling Dynamic URLs

One of the major reasons for using a server-side

language such as PHP is for the ability to generate

dynamic content. Often this will lead to single scripts

that produce their content based on the input

parameters (that is, the variables in the URL).

SEO friendly URLs

The SEO friendly URLs are highly encouraged for us
ing in
Dynamic Sites Navigation.

Some facts which helps in pretty good indexing of pages are:

  1. No of Pages
  2. Access Frequency of Pages
  3. Meaningful(SEO Friendly) URLs for accessing a page
  4. Link Exchange

So Lets think about the appearence of a non SEO friendly URL

it may look like

Based on the supplied URL parameters 'sec' and 'id' the respective item is fetched and shown in the browser.Here the index page is manupulated for the variant display of items.

Search engines are less efficient in indexing Dynamic URLs .Inorder to over come such a situation we can do some alterations in this URL and make it more meaningful for Searchengines as well as users of the website.

I will give a suggestion for the above URL like the one below

This looks more meaningful right :).

By this technique

  • You can use a Static like Dynamic URL which is more meaningful to User and the search engine.
  • Hide the technology or language you have used for creating the website.
  • Easily Indexibile for Search Engines.
  • Gives a feel to Web crawlers that the site have lots of pages under lots of virtual folders.
  • Makes Easily trackable URLs.(You can easily track from the list of URLs popdown from the addressbar of Browser).

How to generate SEO friendly URLs

This is not much complex step.Its like generating the synamic URLs but some

more meaning ful fields added in the URL.

A sample script for creating the dynamic URL


$qry="Select Id,SectionName from tbl_SECTION ";



print("<a href='detail.php?sec=$row['Id']'>$row['SectionName'] </a>");



This will generate links liks

"<a href='detail.php?sec=1'>Personal </a>

"<a href='detail.php?sec=2'>Technical </a>

"<a href='detail.php?sec=3'>Spiritual </a>

"<a href='detail.php?sec=4'>SEO Techniques </a>

Some additional work can be done on this to make this a SEO friendly URL

We can change the above php code like this


$qry="Select Id,SectionName from tbl_SECTION ";



print("<a href='");
print($row['SectionName']/$row['Id']/'>$row['SectionName'] </a>");



This will generate links liks

"<a href=''>Personal </a>

"<a href=''>Technical </a>

"<a href=''>Spiritual </a>

"<a href=' Techniques/4/'>SEO Techniques </a>

If you check the fourth URL you can find a space between 'SEO' and 'Techniques'

in such cases you can replace the space with an hyphen (-).

print("<a href='");
print($row['SectionName'] </a>");

and the output will be like

<a href=''>SEO Techniques </a>

Avoid use of '_' instead of '-'.

Next question is how to access this URL or how Browser identify this SEO friendly URLs

This magic is done by the HTACCESS file which is placed in root of your web directory.

.HTACCESS file and URL rewrite rule

.HTACCESSFILE : .htaccess is the default name for a file that is used to indicate

who can or cannot access the contents of a specific file directory from the Internet or an

intranet. The .htaccess file is a configuration file that resides in a directory and

indicates which users or groups of users can be allowed access to the files

contained in that directory.It may also contain some rewrite rules which say

the server to access a page in it if the URL on the browser address bar satisfies

any of the rewrite rules on .htaccess file.

A sample .htaccess file

all requests to whatever.htm will be sent to whatever.php:

DirectoryIndex index.php

<Files .htaccess>

order allow,deny

deny from all


Options +FollowSymlinks

RewriteEngine on

RewriteRule ^(.*)\.htm$ $1.php [NC]

Lets rewrite our Example URLs

the .htaccess file content will be like this

Options +FollowSymlinks

RewriteEngine on

RewriteRule ^(.*)\.htm$ $1.php [NC]

RewriteRule ^topics/(.+)/([0-9]+)/(.+)/([0-9]+)/$
http://%{SERVER_NAME}/index.php?sec=$2&id=$4 [nc]

Here the SEO URL

will be rewrited to

Use of Site Map

Usually saved as sitemap.html or sitemap.php ...etc

This file will be having the list of all possible or most

important links of Your website and the URL in it should be in

SEO friendly mode.This will help in links traversal of search engines

which finally result in indexing.




Popular posts from this blog

Payback Points - How to redeem - How to merge multiple payback accounts - Block Payback card - Payback customer care

Your SBI Debit card ending with XX0000 is deactivated only for Internet txn.

SBI account holders may have received an SMS with following message, supposed to be from State Bank of India (SBI).

Your SBI Debit card ending with XX0000  is deactivated only for Internet txn. To activate send SMS "SWON ECOM 0000" to 09223966666. No change for ATM/POS usage
** Replace the four Zeros with last 4 digits of your debit card number

Recently many of the SBI account holder has losed their money due to a hi-tech ATM robbery which happened in Thiruvananthapuram, capital city of Kerala.

Joomla and Forum Integration - Integrating Forums to Joomla

Joomla is one of the most popular CMS opensource packages. It is very easier to develop website's using Joomla. You just need to download Joomla package from Joomla's Official website  and install it on your domain and later adding customizations to templates and feature and Your website is ready :). Now a days most websites provides a forum section for it users for discussing various article topics, gathering opinions etc.

Following are some best know forum opensource packages which can be integrated with Joomla and create a new forum experience for users

Urgent Openings for PHP trainees, Andriod / IOS developers and PHP developers in Kochi Trivandrum Calicut and Bangalore. Please Send Your updated resumes to   Read more »
Search This Blog