Skip to main content



In this article I will explain how we can create websites which are driven by seo friendly urls with out using htaccess.

To read about SEO and HTaccess please read how to create SEO friendly url driven websites using HTaccess rewrite function

When we use HTACCESS for SEO friendly redirections, we use mod_rewrite module of apache. We can create seo friendly url driven site with out using the htaccess mod_rewrite module functions.

I will try to explain it very simple:

take this url path as example ""

for this you need a index file in the root folder
like this :

The content for this page will be populated based on a parameter "content"

like this :

so content of this page changes as the parameter value changes, the contents may be driven from database or include files

sample calls

so if you can fetching contents from the DB, you will be fetching contents from the contant table based on the supplied parameters
You will be showing contents by including a file which is identified by the  supplied parameters.

for example when you call

you will be including a file like "home.php" into the main page ie, "index.php"

if( is_file("includes/home.php") )

Dont think I had diverted from the point....:)  I am coming to it..

Actuall trick starts from here

I am explaining the stuffs based on an assumption that out Main page "index.php" is using one parameter and the way it uses the param plays the trick of feeling like SEO friendly Urls.

You have to set the directory Index of your root folder to index.php.

You can refer index page like  
and also like

I am using the second way for adding the trick ie

when we access this parameter through Global Variable  as $_GET['content']

echo($_GET['content']);   will display  "home"

For applying trick we can use parameter value as the Parameter


so Let see how it can be accessed in the main page  "index.php"

For proper working of the following code, the file name of the included file and the supplied parameter key should be same.

like , if you call
then, there should be a file named "contact-me.php" in the "includes" folder and the file location will be like:

save the following code as index.php
in the code below i assume the  contents in the index.php are  included from "includes" folder at location

//code starts here   


// php section of the file

$my_title="Home : My Php Website";

if( isset($_GET) && trim( key($_GET) )!="" ){
$my_page=strtolower(trim( key($_GET) )).".php";

if( is_file("includes/".$page) ){
$include_page = "includes/".$my_page;
$my_title=ucfirst(str_replace("-"," ",trim(key($_GET)) ));
else $include_page="includes/page-not-found.php";


<!-- Html section of the file-->
<title><?php echo($my_title);?></title>

//code ends here 

Its Done. Now take your page

you can call other pages like

Here I had used only single parameter to define the pages, you can modify the script and make it as multi param driven.


Popular posts from this blog

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

How to apply for a new ration card and what are the documents required?

List of documents required for new ration card application in Kerala and how to apply

Application for a new ration card should be addressed to Taluk Supply Officer (TSO) / City Rationing Officer (CRO) of applicant's residing area.

Primary document required are Residence certificate, Income certificate and incase the applicant's name is in another ration card then he/she should submit the reduction certificate ontained from previous TSO / CRO as proof for removing his/her name from old Ration card.

You can get the new application from your currently residing Taluk Supply Office.

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.

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