I am trying to make my url more friendly, from domain/link/link.php?id=123 to domain/link/123
I have written the following rule:
RewriteEngine On
RewriteRule ^([^/]*)$ link.php?id=$1 [L]
It is on a .htaccess in /link folder.
In my link.php file I have:
echo $_GET['id'];
But the result is always "link.php" without quotes, instead of the number or string.
What am I doing wrong?