0

I have created a web application in php. I display database record on web page with id. My current URL look like below.

example.com/post.php?id=1

Now, I getting all column's value from database where my ID is equal 1 In my database Column URL value on row 1 like below. my-first-page.php I want to display URL like below.

example.com/my-first-page.php?id=1

I want to do this via htaccess file Please experts help me how to do this.

Prabhat G
  • 2,974
  • 1
  • 22
  • 31
  • 2
    Possible duplicate of [URL rewriting with PHP](https://stackoverflow.com/questions/16388959/url-rewriting-with-php) – Derek Brown Mar 23 '18 at 06:22

1 Answers1

0

Try this

RewriteEngine On

RewriteRule ^(post\.php)$ /my-first-page.php [L,R=301,NC]
Anas
  • 971
  • 13
  • 28