.htaccess - Multiple url redirection in apache :mod_rewrite -


i new apache , wish redirect existing url (1) new url(2) , final url(3). redirection url (1) url(2) existing redirect rule defined , cannot pass it. due cannot jump form jump directly url (1) url(3). below exsitng code:

for eg:

    <ifmodule mod_rewrite.c>       rewriteengine on       rewriterule ^/portal-web-payment/(.*)$ /portal-web/$1 [r]       rewriterule ^/portal-web/abc/portal/payment/web/mbbquickrecharge/(.*)$ - [l]  </ifmodule> 

i wish insert below rule existing one, not working.

rewriterule ^/(.*)(portal-web/abc/portal/payment/web/mbbquickrecharge/prepaidquickrechargecontroller.jpf)(.*)$ http://yahoo.com/servlet/du/en/mobilebroadbandrecharge.html [l,r=302] 

below final redirect url wrote, not working.

<ifmodule mod_rewrite.c>       rewriteengine on       rewriterule ^/portal-web-payment/(.*)$ /portal-web/$1 [r]       rewriterule ^/portal-web/abc/portal/payment/web/mbbquickrecharge/(.*)$ - [l]       rewriterule ^/(.*)(portal-web/abc/portal/payment/web/mbbquickrecharge/prepaidquickrechargecontroller.jpf)(.*)$ http://yahoo.com/servlet/du/en/mobilebroadbandrecharge.html [l,r=302] </ifmodule> 

if suppose rule not working due existence of apache flag [l], cannot place our url before due project constraints.

kindly suggest way.

thanks in advance.

update 1: hi, in .conf file. servername our local env : in.test.it:90

<ifmodule mod_rewrite.c>         servername in.test.it:90         rewriteengine on       rewriterule ^/portal-web-payment/(.*)$ /portal-web/$1 [r]       rewriterule ^/portal-web/abc/portal/payment/web/mbbquickrecharge/(.*)$ - [l]       rewriterule ^/(.*)(portal-web/abc/portal/payment/web/mbbquickrecharge/prepaidquickrechargecontroller.jpf)(.*)$ http://yahoo.com/servlet/du/en/mobilebroadbandrecharge.html [l,r=302] </ifmodule> 


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -