OK I just converted my board from IPB to vbulletin. I have the following URLs that I need to redirect to the new vb URLs since they are specific team forums and have a lot of backlinks. OLD: http://www.hoopstalk.net/index.php?showforum=4 NEW: http://www.hoopstalk.net/forumdisplay.php?f=263 OLD: http://www.hoopstalk.net/index.php?showforum=5 NEW: http://www.hoopstalk.net/forumdisplay.php?f=264 OLD: http://www.hoopstalk.net/index.php?showforum=6 NEW: http://www.hoopstalk.net/forumdisplay.php?f=265 OLD: http://www.hoopstalk.net/index.php?showforum=7 NEW: http://www.hoopstalk.net/forumdisplay.php?f=266 OLD: http://www.hoopstalk.net/index.php?showforum=8 NEW: http://www.hoopstalk.net/forumdisplay.php?f=267 I definitely want them all to be 301 redirects not just rewrites How do I do this?
use the following: redirect 301 /index.php?showforum=6 http://www.hoopstalk.net/forumdisplay.php?f=265 redirect 301 /index.php?showforum=x http://www.hoopstalk.net/forumdisplay.php?f=x redirect 301 /index.php?showforum=x http://www.hoopstalk.net/forumdisplay.php?f=x Code (markup): just use a new line for each one, put that in an htaccess. that's the easiest way to go about it.
Yeah for some reason it ignores that. (redirect 301) I know 301 redirects with rewrtie works.. but not that.
that should work just fine. something's odd with your configuration. what code DID work in htaccess? it looks like your htaccess may be disabled, or you're placing it in the wrong directory, or something. the code above is fine.
Nah stuff like this works fine Options +FollowSymLinks RewriteEngine on RewriteRule ^([0-9]+)/(.*).html$ index.php?act=single&q=$1 RewriteRule ^([0-9]+)/$ index.php?page=$1 RewriteRule ^index.html$ index.php RewriteRule ^ads.js$ ads.php RewriteRule ^adsrectangle.js$ adsrectangle.php RewriteRule ^feed.xml$ feed.php RewriteRule ^submit-riddles.html$ index.php?act=submit RewriteRule ^search-riddles.html$ index.php?act=single RewriteCond %{HTTP_HOST} ^onlyriddles.com [NC] RewriteRule ^(.*)$ http://www.onlyriddles.com/$1 [L,R=301]
you still should be able to get the above code to work, that's really odd. is the htaccess file you're placing it in empty? try putting the code first in the file. if that still doesn't work, you can always do it with RewriteRules I suppose... kinda overkill for something like this though
I found out it's because of the question mark in the source URL index.php?showforum=4 If I take that out it works perfectly. With it in it ignores it. Anyone know how to I guess "escape" the question mark symbol ? in .htaccess?
redirect doesn't use pattern recognize, it's for identical matches. you'd need RedirectMatch. that uses regex syntax. you use \ to escape things in regex. you could try it in the plain redirect but I have idea if it'd work. guessing it wouldn't.