I'm making a blog like website in PHP. So I have to rewrite my URLs. I have two urls like:
/post.php?name=something&slug=somethingElse
And
/tutorial.php?name=something
So I want to rewrite it like
/post/something/somethingElse
And for the second one
/tutorial/something
So I'm using following lines in .htaccess :
RewriteEngine on
RewriteRule ^(.+)/(.+)[/]?([.+]?)$ $1.php?name=$2&slug=$3
But it isn't working as I expect to.. Tried Google and Stack answers but that didn't help.