.htaccess - RedirectMatch not working in htaccess -
iam trying to redirect page from
from http://domain.com/article.php?id=23232 http://domain.com/article/23232
am using syntax in .htaccess
redirectmatch 301 article.php?id=(.*)$ http://domain/article/$1
so please error in this?
you cant match query string using redirectmatch
. use mod_rewrite
rules instead:
rewritecond %{query_string} ^id=([^&]*) rewriterule ^article\.php$ http://domain.com/article/%1? [l,r=301,nc]
Comments
Post a Comment