.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

Popular posts from this blog

c - CUDA code not processing if block properly -

oracle11g - get root domain from url Oracle sql regex_substr -

xcode - Swift Playground - Files are not readable -