Forum Moderators: phranque
You also need a \ in this bit: articles\.php.
.
However, looking deeper, there is more:
You say it does not redirect. It won't redirect, there is no [R] in the code. You have an internal rewrite.
If someone asks for articles.php/sometopic&aid=12345 the server silently tries to pull content from the /username/html_public/yoursite/article/12345/sometopic/ folder on your server.
Add the [R=301] to this code to make this into a redirect.
You'll also need a rewrite in the opposite direction to stop any duplicate content issues.
That is, you need one internal rewrite and one [R=301] redirect. Anything else will cause an infinite loop.
.
All this assumes that the links on your page will be in the "folder structure"-like format.
so what should I use instead of (.+)?
I do have a reverse rewrite rule to avoid duplicate contents.
I have tried \.php too but no effect. I have also used R=306 but in vain.
I also dug out Jim's reply to another fello where about cig-bin based redirect and tried to use his code matching with my htaccess but of no use.
this is the other rule. the clickable URLs are of the above rules shape as normally done for SE friendly URLs
the problem is that SEs have listed my dynamic URLs too from the times when I didn't have mod rewrite implemented on the site. So to avoid duplicate contents penalty I am trying to rewrite the dynamic URLs on the fly to a Static URL as permanent removed URL.
the above rule works well without any problem however its reverse rule is not working.