I am developing a website in core php with custom cms. I am facing problem while making the blog url’s seo friendly.
My Url is of this type and I want the url like
websitename/blog/title
If I fix it through htaccess file, that will be static because i want a single function which works for future blog posts as well.
So Please Help me to solve this issue.
2
Answers
Make the specific blog title a
$_GET
value with htaccessthen you can print the blogs out from the blog` id or title
Once that is set up you need to get the
$_GET
data from the blog table of the database in your blogpost.php script like so:obviously security needs to be thought about and prepared statements would be better.
You could try:-