Page 1 of 1

Rewrite url's

Posted: Wed Oct 06, 2010 3:00 am
by klevis miho
How do I rewrite this url:
domain.com/bands/band-name/album-name/

to:
domain.com/bands.php?bname=band-name&aname=album-name?

Re: Rewrite url's

Posted: Wed Oct 06, 2010 6:41 am
by VladSun
Maybe:
[text]RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule /bands/(.+)/(.+)/ /bands.php?bname=$1&aname=$2[L][/text]

Re: Rewrite url's

Posted: Wed Oct 06, 2010 7:17 am
by klevis miho
what if i then want to rewrite just /bands/?