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
Post a Comment