apache - Htaccess url redirect and masking, multiple query strings -


i have tried every redirect , htaccess masking solution problem on stackoverflow,

i able redirect urls i.e:

a. http://www.autotraderuae.com/news/man-up-/2681

redirects to:

b. http://www.autotraderuae.com/news/news_detail/man-up-/?id=2681

but i'd url in browser still show (a) , not (b) without changing php structure ofcourse.

code being used is:

rewriteengine on options +followsymlinks rewriterule ^news/([a-z0-9-.?]+)/([0-9]+)? news/news_detail/$1/?id=$2 [l,qsa,r] 

the page redirects because you've included r flag @ end, which indicates redirect. need remove , keep l , qsa flags.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -