Change URL format with .htaccess -


i've been trying better url format regular one. have deal parameters, , i'd :

http://www.whatever.com/embed.php?site=site1&id=videoid

to :

http://www.whatever.com/embed/site/site1/id/videoid

i've been trying using .htaccess, still don't understand how works.

this have :

rewriteengine on rewritecond %{request_filename} !-f rewriterule ^([^\.]+)$ $1.php [nc,l] rewriterule ^embed/(.*)/(.*)$ /embed.php?site=$1&id=$2 

the 3 first lines hide .php extension, okay, next 1 doesn't work wish !

any 1 idea ?

thanks in advance guys !

try it,

rewriteengine on rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^([^\.]+)$ $1.php [nc,l]  rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^embed/site/([\w-]+)/id/([\w-]+)$ embed.php?site=$1&id=$2 [qsa,l] 

Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -