I am getting some troubles with mod_rewrite.

On my small index page (index.php) I show your blog along with a single blog publish page appears like this: http://www.mydomain.com/blog/post-title

mod_rewrite with this is:

RewriteRule ^blog/([A-Za-z0-9-]+)$ index.php?postslug=$1 [L]

This works like no bodies business.

However I also provide another page known as artists.php and also the url need to look such as this: http://www.mydomain.com/artists/artist-name

mod_rewrite with this is:

RewriteRule ^artists/([A-Za-z0-9-]+)$ artists.php?artistslug=$1 [L]

This provides us a 500 internal server error and that i have no idea why this occurs...

Both index.php and artists.php have been in the main of this site

.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]

Do this rule rather than your one using the two RewriteCond:

RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI}.php -f
RewriteRule ^(.*)$ $1.php [L]

I’ve examined it myself and %{REQUEST_FILENAME} appears to retain the wrong value but -f is examined to true anyhow.

Switch on:

RewriteLog /path/to/file.log
RewriteLogLevel 4
RewriteEngine on

RewriteCond %{REQUEST_FILENAME} -f [NC,OR] 
RewriteCond %{REQUEST_FILENAME} -d [NC] 
RewriteRule .* - [L]

RewriteRule ^blog/([-A-z0-9]+)$ index.php?postslug=$1
RewriteRule ^artists/([-A-z0-9]+)$ artists.php?artistslug=$1

The RewriteRule itself looks fine in my experience, see if the server error happens should you access the performers.perl file directly, with no URL spinning happening.