I have successfully used mod_rewrite to rewrite all the URLs (which originally contained query strings) for a PHP based site I have been working on. They looked good and everything, but then I realized I would have to go back through the site's HTML content and re-write a lot of the hrefs in the links so that they would point to the new SEO/human readable URLs.
This aspect of it (re-writing hrefs) was a pain, and I really don't feel like doing it on the new site I'm working on, especially because Google have been saying they can handle dynamic URLs nowadays and because I know I will have to go through the site and re-write all those hrefs. Also, now I need to go back to my old site and make some structural changes, and I am going to have to spend a lot time re-writing hrefs inside the <a> tags just because I will make some changes to the .htaccess file. This seems too awkward.
Is there a solution for this whereby I can perhaps have a PHP class that parses the mod_rewrite rules in the .htaccess file and then uses them to publish the most up-to-date URLs inside the hrefs of the <a> tags? All I would then have to do is write 'includes' or function calls in place of the hrefs in my 'views', instead of hard coding hrefs. OR is there a simpler way to do this with a built in system in PHP (or library?) or Apache server?
I would really appreciate any help thanks.