I have an old website that URL /page.aspx?sch=XXXX&prg=YYYY . I want to redirect those old URLs to the URL of my new website. I'm trying to use an .htaccess file for the trick, but I could not work it. What do I need:
/ page.aspx? Sch = XXXX & amp; prg = YYYY == & gt;
/ div>
If only these two URL parameters are used in this order, then you can do the following:
rewrite% { QUERY_STRING} ^ sch = ([^ & amp;] +) & amp; PRG = ([^ & amp;; ++) $ rewrite ^ page \ .spx $ / page / sch /% 1 / PRG /% 2? [L, R = 301]
Otherwise, you will need to remove these parameters individually and before that redereption is to be done in the correct order.
Comments
Post a Comment