Hi everyone , i need some help please. I want to use .htaccess with php from CMS / Admin Panel. Basically, i want to masking the links like examples: php link: www.mysite.com/products.php?id=12 i want to change/masking this link to like www.mysite.com/footballs.html Can anybody help me please how i can use .htaccess with php so i will be able to change the link from CMS / Admin Panel which i will make. Waiting to hear from PHP experts. Advance Thanks
RewriteEngine on RewriteRule ^(.+)\.html$ products.php?title=$1 [L,PT,QSA] Code (markup): This htaccess code will pass all URL ends with .html to your page products.php.You can get value "footballs" by $_GET['title']. Now its up to you how to find ID of your post by title.
there is a regular expression tester where you can type in one field your regular expression and then in the other field test if what it suppossed to be taken care by your regular expression is actually being taken care by being highlighted in yellow! do you know what i mean? i cant yet publish links but look for regexpal dot com and you should be good to go with your testing