How to convert dynamic URL to static URL

in order to convert dynamic url to static url, you'll need mod_rewrite module and .htaccess file if your website is hosted in apache server.

Sample Dynamic URL:

Single Page URL
Generated URL:
.htaccess code:
Options +FollowSymLinks
RewriteEngine on
RewriteRule product-categoryid-(.*)-productid-(.*)\.htm$ product.php?categoryid=$1&productid=$2

Directory Type URL
Generated URL:
.htaccess code:
Options +FollowSymLinks
RewriteEngine on
RewriteRule product/categoryid/(.*)/productid/(.*) product.php?categoryid=$1&productid=$2
RewriteRule product/categoryid/(.*)/productid/(.*)/ product.php?categoryid=$1&productid=$2

Was this answer helpful?

Also Read

What is the Git Version Control ?

  WHAT IS GIT ? Git is a version control software Whenever you make some changes in a...

How to install WordPress by using Plesk

Step 1 Login to the Plesk Panel. Then, from the hosting servers menu that located in the left,...

How to monitor website's error logs?

First of all, you need to check whether or not the error logging on your account is enabled. To...

My images are broken, or don't show up!

Firstly, check to see whether they are uploaded to our server and are in the correct...

How to solve PHP issue with " ini_set() has been disabled for security reasons"?

Issue: You may facing error saying that "ini_set() has been disabled for security reasons". You...