1

I have a this page get_cost.php and when URL gets GET method "id" data it will be like this get_cost.php?id=4. So I want to change this url like this website.com/get_cost/4 what I must do for this in php?

  • [pretty url php](https://www.google.co.uk/search?q=pretty+url+php&oq=pretty+url+php&aqs=chrome..69i57.272j0j7&sourceid=chrome&ie=UTF-8) – Script47 Aug 16 '16 at 20:52

1 Answers1

0

This question already answered many times before. First you must search your question in site. You can do it with RewriteRule. You must use .htaccess code for this. To get this add this code to your .htaccess file.

RewriteEngine On
RewriteRule ^get_cost/([0-9]+)/ get_cost.php?id=$1

If your filename different you can change get_cost from the code.

NurlanXp
  • 156
  • 2
  • 14