in my page i want to show a content with the id as reference and that will be like the following


i can call this directly by typing in the url or i can use hyperlinks

to type in the url i use the following rewriterule and it is working

RewriteEngine On
RewriteRule ^foldername/([0-9][0-9])$ /foldername/$1/ [R]
RewriteRule ^foldername/([0-9][0-9])/$ /foldername/recipecontent.php?rid=$1

after the page loads all the hyperlinks appears like this...


and i want the hyperlinks to show localhost/folder/45
or when i click a hyperlink which is like this localhost/folder/recipecontent?rid=45 to be
this localhost/folder/45

what are the ways to use the rewriterule differently
every site starts from the basic with the above example as the start...