.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++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -