ozestretch Posted March 9, 2011 Share Posted March 9, 2011 Hi, I am looking to redirect URLS from: mypage.php?id1=this&id2=that&id3=&id4=&id5=&id6=&id7=last to mypage--id7-id1-id2 id1 alphanumeric, id2 numeric id7 (may have special chars (- + &)) this is what I have tried Options +FollowSymlinks RewriteEngine on RewriteRule ^mypage-([^\n]+)--([0-9a-z]+)-([0-9]+)$ /mypage.php?id1=$2&id2=$3&id3=&id4=&id5=&id6=&id7=$1 [NC] RewriteRule ^mypage\.php\?id1=([0-9A-Za-z]+)&id2=([0-9]+)&id3=&id4=&id5=&id6=&id7=([^\n]*)$ mypage-$3--$1-$2 [R=301,NC,L] It handles 1 part fine, mypage--id7-id1-id2 is read as mypage.php?id1=this&id2=that&id3=&id4=&id5=&id6=&id7=last I just want it to redirect the old non SEO url then read as this is updating a site with a couple thousand pages already linked on the net. Ideas welcomed. Quote Link to comment https://forums.phpfreaks.com/topic/230076-redirect/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.