Leakbali
w3 Tutorial, Web Tutorial
Switch to English Bahasa Indonesia 
Register   Login

Articles  


Share Maintaining URL Consistency 

More Articles


Regardless of whether your URLs are static or dynamic, it's important to maintain consistency. In the case o dynamic URLs, it's important to maintain consistent parameter order in URLs with more than one parameter.

In PHP, the parameters of a query string are typically accessed by name rather than by ordinal. The order in which the paramaters appear does not affect the output of the PHP script, unless your script is specifically written to take parameter order into consideration. Here is an example where a PHP web site would generate the exact same content, but using different URLs:
  • http://www.example.com/catalog.php?product_id=1&category_id=2
  • http://www.example.com/catalog.php?category_id=2&product_id=1
If the catalog.php script accesss the parameters as $_GET['product_id'] and $_GET['category_id'], respectively, these two different URLs would generate the same content. There's no standard specifying that URL parameters are commutative. If both dynamic links are used within the web site, search engines may end up parsing different URLs with identical content, which could get the site penalized.

In conclusion, it's wise to be consistent and follow a standard parameter order to avoid problems and improve your rankings. Consider an example where the parameter order may make a difference:
  • http://www.example.com/compare_products.php?item[]=1&item[]=2
  • http://www.example.com/compare_products.php?item[]=2&item[]=1
Here, the parameter name is item, and it's used to populate a PHP array called $_GET['item']. In the former case the item array contains (1,2), and in the latter it contains (2,1). In this case, a search engine cannot assume these URLs are equivalent and indeed they may not be.

The Programmer should also try to use consistent capitalization on file names and query strings. Search engines resolve such simple differences, especially because file names in Windows are not case sensitive, but the following URLs are technically different in both Windows and UNIX operating system:
  • http://www.example.com/products.php?color=red
and
  • http://www.example.com/products.php?color=RED
Post by : w3 Administrator
Post on : 18 September 2011
Title : Maintaining URL Consistency
Category : SEO Guide
Source :
Comment (0)
Name *
Email *
Website
example : http://www.google.com or http://www.yourname.com
Comment *
Security Code *

Articles


References

About Us

Home
About Us
Contact Us
Sitemap

Tools

Google PageRank
Alexa Rank
Keywords Density

Accounts

Register Account
Login
Valid XHTML 1.0 TransitionalValid CSS!
Web Directory


2006 - 2012 © Leakbali.com - Free Web Tutorial, Free Web Articles, Web Sharing, Source Codes, Web References