sash_007, on 16 March 2010 - 05:56 AM, said:
I am just wondering what makes a url look like this
http://www.dafont.com/new.php?page=4
Well, that's the standard way of writing a query string: ?var1=val1&var2=val2&etc
Each variable in the string is used to dynamically change the content displayed on the page. As Geeks mentioned above this is usually accomplished by extracting data from a database, based on the query string.
sash_007, on 16 March 2010 - 05:56 AM, said:
and though there is rewrite url method available why do these sites keep this type of url
I can think of a couple of reasons:
1. Older sites that were built before widespread adoption of "pretty URLs"
2. Sites that are hand-crafted, and don't make use of a CMS or programming framework that takes care of URL rewriting
3. Sites that do use a framework or CMS, but the developer isn't aware of how to enable URL rewriting using .htaccess
I also think it is worth bearing in mind that coding frameworks such as Codeigniter, CakePHP, etc, require that each URL segment appears in a specific order:
controller/action/var1/var2/etc/
This doesn't allow for the same flexibility as a standard query string, especially if people are linking to your site. Adding, removing or moving a segment might break existing links.