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
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Email Protection using RBL (Real-time Block List)

We at myduniahosting always strive to make sure that our email services are always protected from...

Installation error cause by PHP disable functions

Issue:Receive errors when trying to install new CMS(Content Management Systems) which saying that...

How do I password protect a directory?

Login to cPanel. Locate and click on the "Directory Privacy" icon under the "Files" category....

How to force browser cache on my website?

Issue: When you check your website using http header tools you can see that your website is not...

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...