RewriteEngine On
RewriteRule ^(.+)-([0-9]+)$ index.php?page=article&title=$1&id=$2 [QSA,L]
# OR if you might have other types of URLs that end with dash and numbers:
RewriteRule ^article/(.+)-([0-9]+)$ index.php?page=article&title=$1&id=$2 [QSA,L]
Hello,
I have link in my site like:
<a href="index.php?page=article&title=title-something&id=1234">blabla</a>
I want to use in my site friendly links like:
<a href="title-something-1234">blabla</a>
Where "title-something" is a title from an article and "1234" it's his ID.
How can I change the htaccess file in order if I click on that link to show that article but to make the mysql select query by ID ?
Thanks
