Forum Moderators: phranque

Message Too Old, No Replies

mod_rewrite suggest

Suggest about best setup of more dir and subdir..

         

webstyler

12:16 pm on Jan 10, 2006 (gmt 0)

10+ Year Member



Hi

we have actually 3 dinamic page that read category, subcategory and article details.

with mod_rewrite we want to make this change:

Category
now: category.php?cat=210
we like: title_of_cat.html
solution(?): /cat/210/title_of_cat.html

Sub-Category
now: category.php?cat=210&scat=34
we like: /tile_of_cat/title_of_subcat.html
solution(?): /cat/210/scat/34/tile_of_cat/title_of_subcat.html

Article
now: article.php?ida=34
we like: /title_of_cat/title_of_subcat/title_of_article.html
solution(?): /art/34/tile_of_cat/title_of_subcat.html/title_of_article.html

--
Is best solutions?
Have any suggest?
Can you help to write rule?
it's possible to change / with _ as /art/34/ become /art_34/?

thksksk

jdMorgan

4:32 pm on Jan 11, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The only useful suggestion I can make is to keep the URLs short, minimize the number of slashes, and get rid of anything that's not needed -- e.g. ".html"

For example,

Instead of /cat/210/title_of_cat.html, use /c210/title_of_cat

Instead of /cat/210/scat/34/tile_of_cat/title_of_subcat.html, use /c210/s34/title_of_subcat

You can use mod_rewrite to easily find /s<number>/c<number>/<text> to identify and rewrite these URLs to the proper script call.

Jim

webstyler

5:29 pm on Jan 11, 2006 (gmt 0)

10+ Year Member



thks for useful suggest :)