This looks like it would be simple....for someone who knows what they are doing. I need to redirect like a million pages with this format: old: http://www.mydomain.com/game_9354_zuzu-pirates_en_pc.html new: http://mydomain.com/newfolder/gameinfo.php?id=9354&foldername=zuzu-pirates&local=en>ype=pc I've been searching for the answer. I see that most of the parts of the URLs match, just in different spots. I know I need some sort of a query string, but I'm lost on all the other symbols. Not sure what to do with the different between www and no www either, but that's not important right now. I'd just really like to get the bazillion urls in Google redirecting to where they need to go. Thank you in advance!!
quite a puzzle, mod rewrite is your answer http://www.mydomain.com/game_9354_zuzu-pirates_en_pc.html break it down.... http://www.mydomain.com/game _ 9354 _ zuzu-pirates _ en _ pc .html$ then rebuild http://mydomain.com/newfolder/gameinfo.php?id= . $2 . &foldername= . $3 . &local=$4 . &gtype=$5 btw, change your & to & and your = to ascii code %2F or whatever = is, im just guessing
just a quick stab and guess, its very wildcardish and can be improved, sorry not interested in doing your homework completely :-D RewriteRule ^game_/([0-9]+)_(.*?)_(.*?)_(.*?).html$ /newfolder/gameinfo.php?id=$1&foldername=$2&local=$3&gtype=$4 [L] old: http://www.mydomain.com/game_9354_zuzu-pirates_en_pc.html new: http://mydomain.com/newfolder/gameinfo.php?id=9354&foldername=zuzu-pirates&local=en>ype=pc
That is just magical!! You guys are THE best ever! Thank you so very much for taking the time (and so quickly) to respond. I had to fool with it a bit, which is great. I love puzzles!! I've got it working and it's amazing. For any future lurkers, here's what I ended up with: RewriteRule ^game_([0-9]+)_(.*?)_(.*?)_(.*?).html$ /newfolder/gameinfo.php?id=$1&foldername=$2&local=$3&gtype=$4 [L,R=301] I didn't think to change the = to %2F. What is the reason behind that so I can do some research? Thanks again!!