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

mysql - FireDac error 314 - but DLLs are in program directory -

git - How to list all releases of public repository with GitHub API V3 -

c++ - Getting C2512 "no default constructor" for `ClassA` error on the first parentheses of constructor for `ClassB`? -