This is my default dynamic link:
www.example.com/news/index.php?id=5&title=Test-Title-3
This is the link that have been rewritten by htaccess:
www.example.com/news/5/Test-Title-3
Now I wish to get the id variable (which is 5) and/or title variable (which is Test-Title-3) with PHP.
I have tried using $_GET['id']
but returns
index.php/Test-Title-3
or using $_GET['title'] which returns nothing. Any idea how to get the variable?
(Edited) This is my .htaccess file, in case of need:
Options +FollowSymLinks Options All -Indexes
<files .htaccess>
order allow,deny
deny from all
</files>
RewriteEngine on
RewriteRule (.*)/(.*)/ index.php?id=$1&title=$2