I'm having some troubles with mod_rewrite.
On my index page (index.php) I show a blog and a single blog post page looks like this: http://www.mydomain.com/blog/post-title
mod_rewrite for this is:
RewriteRule ^blog/([A-Za-z0-9-]+)$ index.php?postslug=$1 [L]
This works like a charm.
But I also have another page called artists.php and the url should look like this: http://www.mydomain.com/artists/artist-name
mod_rewrite for this is:
RewriteRule ^artists/([A-Za-z0-9-]+)$ artists.php?artistslug=$1 [L]
This gives me a 500 internal server error and I have no clue why this happens...
Both index.php and artists.php are in the root of my website
.htaccess file:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
RewriteRule ^blog/([a-z0-9\-]+)$ index.php?postslug=$1 [L]
RewriteRule ^artists/([a-z0-9\-]+)$ artists.php?artistslug=$1 [L]