I have a rewrite rule on my webpage.

```
RewriteEngine On

RewriteRule ^(.*) index.php?p=$1 [L]

```

I want it to work so it rewrites URLs like this:

```
http://example.com           -> index.php
http://example.com/home      -> index.php?p=home
http://example.com/lol       -> index.php?p=lol

```

But when I use the following php code inside my index.php

```
print_r($_GET)

```

It gives this:

```
Array ( [p] => index.php )

```

It gives this same results in all URLs (I tried these: `http://example.com`, `http://example.com/`, `http://example.com/about`, `http://example.com/about/`

Can you help me debig this?