I have lot or articles with this URL format:
mydomain/art/details.php?articleid=24463&parentid=1&catid=166
the above is an example.
And i want that redirect these kind of URL to :
mydomain/art/24463.html
Please let me know that how can i do it with .htaccess?
Thanks in advance
parentidandcatidare not in your new format url and are dynamic parameters, you can't have a generic rule. You must useRewriteMapor write a rule by url. Or you can add thoses params to your new format url and then it will be possible to write a generic rule/art-166/1-24463.htmland then have a generic rule likeRewriteRule ^art-(\d+)/(\d)-(\d+)\.html$ /art/details.php?articleid=$3&parentid=$2&catid=$1 [L]mydomain/art/24463.html. Bynew formati mean the new accessible url