The purpose of this post is How can change dynamic URL to Static URL in PHP with Example. Below Screenshot there are dynamic URL Step 1 Create Example.php file in project folder Example.php Hiii this is Example for How to change dynamic URL to static URL in PHP Step 2 Create .htaccess file and put below content in this file RewriteEngine On RewriteRule ^test?$ Example.php After changes and refresh the page and check below result displayed