Very easy and simple .htaccess & PHP tutorial

If you work with PHP, you notice that this URL: is not pretty at all. There is term “Pretty URL” and a lot of tutorials how to make your URL prettier. In this post I’m going to share a few line of .htaccess codes to make your URL more prettier.

Let’s go back to that URL. Here is the goal, we want to make a fake URL like this: that redirects us behind the scene to that ugly URL (

Here is what we need to add to our .htaccess file:

RewriteEngine On
RewriteRule ^post/(.*)$ index.php?post=$1

Read this post to know how to create an .htaccess file:

$1 in that code is a variable. So if a user opens this URL: then the value of $1 is number 110.

Getting boored? Why not playing a game?

Power Block

Tiki Solitaire

Pet Connect

Cake Shop

Jewels Blitz 3

Forest Match

Bike Racing


Solitaire Swift

Bubble Shooter Classic HD

Black and white snake

Leave a Reply

Your email address will not be published. Required fields are marked *