How can I fetch the value that comes after tags/value.html
The URL: example.com/tags/value.html since the value is always different how can I take it and convert into PHP value I can use in SQL query to search for similar posts!
I can’t use $_GET because I want the URL to be SEO friendly can’t use tags.php?tag=value
You can use tags.php?tag=seo (i.e. $_GET) but then use a URL rewrite in your htaccess to make it sexier . You can make it look like whatever. Perhaps site.com/tags/value/
RewriteEngine on
RewriteRule ^tags/([a-z]*)\.html$ tags.php?tag=$1 [L]
If you have questions on this code (or where to use it), please READ the link above as it will tell you everything you need to know about mod_rewrite. THEN, if you still have questions, come back here or PM me directly.