redknight Posted June 16, 2009 Share Posted June 16, 2009 I've looked in google on how to let RedirectMatch ignore lower- and uppercase, but still no luck. My code in htaccess.... RedirectMatch 301 /(.*)badword(.*) http://www.microsoft.com/ RedirectMatch 301 /(.*)Badword(.*) http://www.microsoft.com/ Now I can filter out "badword" and "Badword", but offcourse no "BaDwOrd"... What am I doing wrong? ??? Quote Link to comment https://forums.phpfreaks.com/topic/162321-solved-can-redirectmatch-301-ignore-lower-and-uppercase/ Share on other sites More sharing options...
corbin Posted June 16, 2009 Share Posted June 16, 2009 RedirectMatch 301 /(.*)badword(.*) http://www.microsoft.com/ [NC] Should work. Quote Link to comment https://forums.phpfreaks.com/topic/162321-solved-can-redirectmatch-301-ignore-lower-and-uppercase/#findComment-856779 Share on other sites More sharing options...
redknight Posted June 16, 2009 Author Share Posted June 16, 2009 RedirectMatch 301 /(.*)badword(.*) http://www.microsoft.com/ [NC] Should work. Thank you, but that gives me an internal error. Quote Link to comment https://forums.phpfreaks.com/topic/162321-solved-can-redirectmatch-301-ignore-lower-and-uppercase/#findComment-856825 Share on other sites More sharing options...
corbin Posted June 16, 2009 Share Posted June 16, 2009 Ahhh x.x guess [NC] isn't valid with RedirectMatch... You could do: RewriteRule (.*)badword(.*) http://microsoft.com/ [NC,R=301] Quote Link to comment https://forums.phpfreaks.com/topic/162321-solved-can-redirectmatch-301-ignore-lower-and-uppercase/#findComment-856830 Share on other sites More sharing options...
redknight Posted June 16, 2009 Author Share Posted June 16, 2009 Ahhh x.x guess [NC] isn't valid with RedirectMatch... You could do: RewriteRule (.*)badword(.*) http://microsoft.com/ [NC,R=301] TY ver much. Now it's working The strange thing is that it only worked when I put this on the next line behind RewriteEngine on Options +FollowSymLinks Options +SymlinksIfOwnerMatch I also use "RewriteRule ^([^/]+)blabla [QSA,L]" to rewrite urls. So it's not working after this. Quote Link to comment https://forums.phpfreaks.com/topic/162321-solved-can-redirectmatch-301-ignore-lower-and-uppercase/#findComment-856842 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.