RewriteEngine On
RewriteCond $1 ^({exp:query sql="SELECT group_name FROM exp_template_groups"}{group_name}|{/exp:query}P[0-9]{2,8}) [NC]
RewriteRule ^(.*)$ /index.php/$1 [L]This is the code I am using and it gives me this error:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.Please contact the server administrator, .(JavaScript must be enabled to view this email address) and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
[Moderator Edit: Moved to How To forum]