0
votes

i have been trying to find the solution through previous question on SO, but im getting errors when using them. how to make this url : /viewpost.php?postid=81 as /viewpost/81 in the url so that when /viewpost/81 is entered, it shows the content of /viewpost.php?postid=81?

1

1 Answers

0
votes

You must capture the number and append this number as part of the query string

RewriteRule ^viewpost/(\d+)$ /viewpost.php?postid=$1 [L]