regex - Change a particular string in url using htaccess -


i want change url from

http://intervideo.2watt.net/component/content/article.html?id=65&itemid=479 

to

http://intervideo.2watt.net/component/content/article.html?id=65&itemid=332 

i have tried following code not working

rewriterule ^/?itemid=479/(.*)$ itemid=332/$1 [r=301,l] 

you cannot capture query string rewriterule. use rewritecond instead:

rewritecond %{query_string} ^(id=\d+)&itemid=479$ [nc] rewriterule ^component/content/article\.html$ %{request_uri}?%1&itemid=332 [l,nc,r=302] 

Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

c# - two queries in same method -