I'm attempting to use htaccess to write my urls as localhost/username instead of localhost/profile.php?id=username

I looked it up and this is what I found to be the solution

```
DirectoryIndex index.php
RewriteEngine On
RewriteRule ^(.*)$ /profile.php?id=$1 [L]

```

That's an exact copy from this stackoverflow question [htaccess rewrite for query string](https://stackoverflow.com/questions/1231067/htaccess-rewrite-for-query-string) however, for some reason it always returns a 500 error. I'm not sure why it's giving me this since I'm no expert with htaccess. I pretty much just find code modify it to fit my use.

Mod\_rewrite is definitely turned on. So I know that can't be the issue. Any idea what is wrong with the code I have?

**Edit:**

This is what the apache error log returned.

[Sat Apr 27 14:20:10.558122 2013] [core:error] [pid 3244:tid 1688] [client 127.0.0.1:58653] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.