article

Thursday, April 15, 2010

SEO Tools - URL Rewriting

SEO Tools - URL Rewriting

Static URLs are known to be better than dynamic URLs for a number of reasons:
Static URLs typically rank better in search engines.
Search engines are known to index the content of dynamic pages much more slowly than that of static pages.
Static URLs look friendlier to end users.

Example of a dynamic URL
http://www.yourdomain.com/profile.php?mode=view&u=7

Examples of the above static URL
http://www.yourdomain.com/profile-mode-view-u-7.html
or
http://www.yourdomain.com/profile/mode/view/u/7/





//example
//Method 1 - Single Page URL
//ex dynamic URL
//http://www.domain.com/profile.php?mode=view&u=7

//After converting your dynamic URL
//http://www.domain.com/profile-mode-view-u-7.html

//Create a .htaccess file with the code below
Options +FollowSymLinks
RewriteEngine on
RewriteRule profile-mode-(.*)-u-(.*)\.html$ profile.php?mode=$1&u=$2


//Method 2 - Directory Type URL
//ex. dynamic url
//http://www.domain.com/profile.php?mode=view&u=7

//After converting your dynamic URL
//http://www.domain.com/profile/mode/view/u/7/

//Create a .htaccess file with the code below

Options +FollowSymLinks
RewriteEngine on
RewriteRule profile/mode/(.*)/u/(.*)/ profile.php?mode=$1&u=$2


Related Post