This is the first time I use mod_rewrite and I can’t get it to work. I have a website with bands and their IDs. What I want:
a URL /bands/My_Band_id13/ should redirect to /bands/index.php?bandname=My_Band&bandID=13
What I have:
RewriteRule ^/bands/(.*)_id(.*)/$ /bands/index.php?bandname=$1&bandID=$2
What am I doing wrong?
try adding the
'qsappend|QSA' (query string append)rewrite flag to your rule, ie.UPDATE: also, try removing / outcommenting your
RewriteBase /. if this doesn’t work, neither, try moving your.htaccessfile into the same directory your index.php is in and adapt theRewriteRule, eg.