Web Design Forum: What make a url look like this - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

What make a url look like this Rate Topic: -----

#1 User is offline   sash_007 

  • Trap Grand Marshal Member
  • PipPipPipPip
  • Group: Members
  • Posts: 638
  • Joined: 18-July 09
  • Reputation: 5
  • Gender:Male
  • Experience:Intermediate
  • Area of Expertise:Web Designer

Posted 16 March 2010 - 05:56 AM

Hello friends,

I am just wondering what makes a  url look like this 



http://www.dafont.com/new.php?page=4




and though there is rewrite url method available why do these sites keep this  type of url



0

#2 User is offline   Geeks 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 321
  • Joined: 07-October 09
  • Reputation: 11
  • Gender:Male
  • Location:South Africa
  • Experience:Intermediate
  • Area of Expertise:Designer/Coder

Posted 16 March 2010 - 06:44 AM

it is normally used when the pages are stored in a database then the 4 is a reference to the ID of the row.

the reason for storing the page in a database is that it can be more effectively searched and updated.
0

#3 User is offline   jnicol 

  • Forum Newcomer
  • Pip
  • Group: Members
  • Posts: 52
  • Joined: 15-March 10
  • Reputation: 0
  • Gender:Male
  • Experience:Advanced
  • Area of Expertise:Web Designer

Posted 16 March 2010 - 06:45 AM

View Postsash_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.

View Postsash_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.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users