Apache rewrite - optional parameters?
- by Mayhem
I'm creating SEO friendly urls for my news page.
My links look like this :
www.site.com/1234/the-pretty-url-string/
RewriteRule ^([^/])/([^/])/$ /news.php?sid=$1&url=$2 [L]
This works great, but I like to have more flexability.
I want to be able to accept urls like :
www.site.com/1234
www.site.com/1234/
so then I can do some php $GET's and figure out if anything is missing - and 301 to the proper URL of my choice. I would like the &url=$2 to be optional.