Dynamic mod_rewrite or how to plan a dynamic website

Posted by Sophia Gavish on Stack Overflow See other posts from Stack Overflow or by Sophia Gavish
Published on 2010-03-28T14:20:52Z Indexed on 2010/03/28 14:23 UTC
Read the original article Hit count: 615

Hi, I'm trying to make a clean url for a blog on a dynamic website, but I think that the problem is that I don't know how to plan the website schema.

I read about how to use mod_rewrite and all I found is how to make "http://www.website.com/?category&date&post-title" to "http://www.website.com/category/date/post-title". that's works o.k for me.

The problem is that If my url looks like "http://www.website.com/blog/?id=34" this method won't work as far as I got it.

So, I have two questions: 1. Is there a way to use mod_rewrite (maybe read from a txt file) to read the post title of my blog and rewrite my url by date and post-title? 2. Should I rewrite my website to query the data from one index file in the homepage and use mod_rewrite to write the nice url? should I query also the date and the title of the post instead just the post ID?

© Stack Overflow or respective owner

Related posts about php

Related posts about mod-rewrite