Why is my htaccess file causing a 500 error? 

I am trying to get it so when anyone enters <http://www.example.com/24> it will run the script for the 'key' 24 but the server reads <http://www.example.com/?key=24>.

Php script on index.php:

```
<?php include("scripts/config.php");
include("scripts/facebook.php");

if(isset($_GET['key'])){

$like_id=mysql_real_escape_string($_GET['key']);

include_once 'like/index.php';

}else{

include_once 'home.php';

}
?>

```

htaccess code: 

```
RewriteEngine On

RewriteRule ^([a-zA-Z0-9_-]+)/\index$ index.php?key=$1

RewriteRule ^([a-zA-Z0-9_-]+)/\index$ index.php?key=$1

```

Also could it be where i'm saving my htaccess file? currently its in the htdocs folder.