OpenNetGuru

Thursday, Jul 29th

Last update:11:51:55 AM GMT

You are here: Developer Zone php / mysql Search engine friendly on PHP

Search engine friendly on PHP

E-mail Print PDF


Search engine friendly URL:
http://www.publicencounter.com/page/v/v1/v2/v3
NON-Search engin friendly url(SEF):
http://www.publicencounter.com/page.php?v=v1&v2=v2

Edit the .HTACCESS file
You must make a .htaccess
RewriteEngine On
#turn on the Rewrite engine, if it's not already active

#set the base directory to /
RewriteBase /

# now the rewriting rules

RewriteRule ^index/ index.php

RewriteEngine On
- This turns on mod_rewrite. Thats it.
RewriteBase /
- This tells mod_rewrite where the files reside to be redirected to
RewriteRule ^index/ index.php
- It tells mod_rewrire that any URL with index/ should be redirected to index.php. [L] tells it to stop after that (mod_rewrite)