TheJazzyOne
09-21-2011, 03:31 PM
Somewhere over the years I had some issues with relative URLs messing up some links in some of my posts. They'd create really long links that would look something like this:
http://www.thevikingship.net/category/minnesota-vikings-music-video-week-11-vikings-vs-seahawks-come-to-the-dome/minnesota-vikings-music-video-week-7-vikings-at-steelers-the-vikings-come-to-town/minnesota-vikings-music-video-week-3-minnesota-vikings-vs-san-francisco-49ers-no-chance/minnesota-vikings-music-video-week-16-vikings-at-bears-purple-and-gold-haze/minnesota-vikings-music-video-week-14-vikings-vs-bengals-vikings-r-good/tag/minnesota-vikings-music-video-2010-week-1-vikes-number/minnesota-vikings-music-video-2010-week-6-beat-cowboys/minnesota-vikings-music-video-2010-week-9-skol-type/tag/green-bay-packers/www.gainesville-marketing.com
Almost all of them start with "http://www.thevikingship.net/category/minnesota-vikings-music-video-week-"...
I remember having the problem, and it was quickly fixed. However, there are a lot of sites out there that grab my content and post it on their own pages, which means the internet is now full of copies of these bad links. They get processed often, and it's causing extra overhead on WordPress.
Is there a way through .htaccess rewrites or something that I can change any URL that matches "http://www.thevikingship.net/category/minnesota-vikings-music-video-week-" (with a wildcard following it) to be redirected to the home page before WordPress even tries to process it?
http://www.thevikingship.net/category/minnesota-vikings-music-video-week-11-vikings-vs-seahawks-come-to-the-dome/minnesota-vikings-music-video-week-7-vikings-at-steelers-the-vikings-come-to-town/minnesota-vikings-music-video-week-3-minnesota-vikings-vs-san-francisco-49ers-no-chance/minnesota-vikings-music-video-week-16-vikings-at-bears-purple-and-gold-haze/minnesota-vikings-music-video-week-14-vikings-vs-bengals-vikings-r-good/tag/minnesota-vikings-music-video-2010-week-1-vikes-number/minnesota-vikings-music-video-2010-week-6-beat-cowboys/minnesota-vikings-music-video-2010-week-9-skol-type/tag/green-bay-packers/www.gainesville-marketing.com
Almost all of them start with "http://www.thevikingship.net/category/minnesota-vikings-music-video-week-"...
I remember having the problem, and it was quickly fixed. However, there are a lot of sites out there that grab my content and post it on their own pages, which means the internet is now full of copies of these bad links. They get processed often, and it's causing extra overhead on WordPress.
Is there a way through .htaccess rewrites or something that I can change any URL that matches "http://www.thevikingship.net/category/minnesota-vikings-music-video-week-" (with a wildcard following it) to be redirected to the home page before WordPress even tries to process it?