I want to change my website\'s dynamic urls to Search Engine Friendly URL\'s
Now the urls like this www.website.com/news.php?id=127591 , I want it became this www.websit
Please try this rule in your .htaccess file:
RewriteEngine on
Options +FollowSymlinks -MultiViews
RewriteCond %{THE_REQUEST} \?id=([0-9]+)\s [NC]
RewriteRule ^news\.php /news/%1? [R=301,L]
RewriteRule ^news/([0-9]+) /news.php?id=$1 [L,NS,NE,QSA,NC]
Inside news.php
when URL doesn't have /some-title
then output this META tag to stop indexing /news/987
type URIs:
Once you notice URI of /news/987/some-title
inside news.php
simply mask above META tag.
I have tested it and seems to be working fine so let me know if doesn't work for you.