I know how to rewrite a URL, for example: www.example.com/index.php?id=1&cat=3 to www.example.com/1/3/ (or something else). I know it.
What I don't know is how on earth to change all of my links on all pages to link to pretty URLs. All links to my sites are old fashion ( <a href="index.php?id=1&cat=2"> ), and there are many of them.
I ask if anyone has an idea or know how to automatically redirect this pretty url if the user clicks on index.php? id = 1. (Almost like this Stackoverflow site, if you change the title in the URL).
So my presumption ...
Use .htaccess to read index.php? id = 1 & cat = 2 to rewrite the index / 1/3, which itself again interprets (weird)
php redirect file that htaccess overwrites back to the original ...
Conclusion: change <a href="index.php?id=1&....."> automatically to index/1/2
solvable
Options +FollowSymLinks RewriteEngine On RewriteBase /
php friendly-url mod-rewrite rewrite
pufos Apr 6 2018-11-21T00: 00Z
source share