Change .php Url With Id Into .html
Given the PHP URL course.php?id=10 I want it to redirect to course.html and I want to use the id=10 on this page. How can I do this?
Solution 1:
You can't cleanly rewrite the url and not include the variable somewhere. You'll need to do something like so:
RewriteRule ^([0-9]+)/([^.]+)\.html $2.php?id=$1 [L]
Which will work for http://example.com/10/course.html
.
Post a Comment for "Change .php Url With Id Into .html"