I have a website say ' www.example.com'
, I have also created sub domain in this site, say 'www.alpha.example.com'
. I need to convert a dynamic page into SEO friendly URL.
My URL is 'www.alpha.example.com/test/article.php?cat=people'
Into
'www.alpha.example.com/test/article/people'
How to solve this using .htacces
Please help me.
2
Answers
Inside
DocumentRoot
ofwww.alpha.example.com
create a file called.htaccess
with this code:I would do it this way for completeness. This way if they enter
www.alpha.example.com/test/article.php?cat=people
then it will redirect towww.alpha.example.com/test/article/people
also so you will be covered both ways.