I am beginner in PHP. My this code is working fine to remove .php from url. like:http://localhost/travel/route?source=London&destination=paris&route=
But i want url like this:http://localhost/travel/route/source/London/destination/paris
Here is my Code
RewriteEngine On
RewriteRule ^([^\.]+)$ $1.php
RewriteRule ^([^\.]+)$ $1.php
RewriteRule ^route/([0-9]+)/([a-zA-Z0-9_-]+)$ /route?source=$1&destination=$2 [L,QSA]
Here is an example which I using. Hope it can help you :)
DirectoryIndex index.php
RewriteEngine On
RewriteRule ^([a-z0-9_-]+)/([a-z0-9_-]+)/([a-z0-9_-]+)/?$ index.php?page=$1&action=$2&id=$3 [L,NC]
RewriteRule ^([a-z0-9_-]+)/([a-z0-9_-]+)/?$ index.php?page=$1&action=$2 [L,NC]
RewriteRule ^([a-z0-9_-]+)/?$ index.php?page=$1 [L,NC]
RewriteRule ^dashboard/?$ index.php [L,NC]