I am trying to create SEO friendly URLs for my site and I have come to problem that I can´t solve. I can´t figure out how to setup the rewrite rule so it will show for example like this www.mysite.com/shows/late-night and www.mysite.com/news/title-of-article. Here is my htaccess file:
RewriteEngine on RewriteRule ^(.*)/([a-z_-]+) index.php?switch=$1&shows=$2 [NC,L] RewriteRule ^(.*)/([a-z_-]+) index.php?switch=$1&article=$2 [NC,L] RewriteRule ^shows/$ index.php?switch=shows [NC,L] RewriteRule ^articles/$ index.php?switch=article [NC,L]
The rewrite rule works if I comment out the first and the third line, but how I do so both will work.