I want to replace ?id= and .php with slash / in my post url.
I tried many answers from other questions but did not work for me like this one -
Example Url -
https://example.com/testing/events/news/post.php?id=13/Checking-to-see-if-this-works
I want this example url to be like this
https://example.com/testing/events/news/post/13/Checking-to-see-if-this-works
I used following htaccess code and it removes .php extension from url but can't figure out how to replace ?id= with /
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule !.*\.php$ %{REQUEST_FILENAME}.php [QSA,L]
output -
https://example.com/testing/events/news/post?id=13/Checking-to-see-if-this-works
I still can't replace ?id= with /
Thanks for your help :)