Url rewriting

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I'm making a new website in php and I'm using url rewriting for my pages.
Is it better, for inidicization and usability reasons, to make the pages
seem like "directories" or like html static files?
For example: I have a page that shows the news, called news.php.
Is it better to rewrite it /news/ or /news.html ?

Actually I pass every parameter through the url, for example /news/pag_2/.
Is this correct? There is any reason or any situation where is it better to
use the classic parameter passing using the query string (es.


Re: Url rewriting

Quoted text here. Click to load it

For "usability", it is best when your URL gives the user a good idea where
they are.  So "www.example.com/news/id/2/"  is totally not helpful.

Karl Groves

Re: Url rewriting

Karl Groves wrote:

Quoted text here. Click to load it

Better would be:

http://www.example.com/news/2004/10/12/man_bites_dog = "Man bites Dog"
story, 12 Dec 2004.

http://www.example.com/news/2004/10/12/ = List of all stories from 12 Dec
2004, with a brief precis of each.

http://www.example.com/news/2004/10/ = List of all stories from Dec 2004,
just showing story title and date.

http://www.example.com/news/2004/ = List of top 10 most popular stories
from 2004, plus links to monthly pages (e.g. above).

http://www.example.com/news/ = latest headlines

Assuming your database stores the date, title, precis and full article for
each news story this should be fairly easy to construct.

Toby A Inkster BSc (Hons) ARCS
Contact Me  ~ http://tobyinkster.co.uk/contact

Re: Url rewriting

Carlone wrote:
Quoted text here. Click to load it

Hi Carlo

What you are doing is fine, there is no evidence from the search
engines that either way is more successful.  The only drawback is that,
depending on your naming conventions, you may have to add an extra rule
in htaccess to handle the trailing slash.

IMO there is no reason why you need to use the classic querystring, but
it is getting late so I may be too tired to think




Site Timeline