Forum Moderators: phranque
www.foo_foo.com/black-/-white/
Which gets translated to:
www.foo_foo.com/black-%10-white/
Well, I have this page in this folder that went supplemental and I'm trying to redirectmatch the thing away using the following combinations, none of which seem to work:
RedirectMatch 410 ^/black-\%10-white/page-now-gone/
RedirectMatch 410 ^/black-%10-white/page-now-gone/
RedirectMatch 410 ^/black-/-white/page-now-gone/
RedirectMatch 410 ^/black-\/-white/page-now-gone/
Unfortunately, 2 hours later I still can't figure out how to do this. Search engines don't like the "%10" so looking for the exact information is proving tough. Any help is deeply appreciated.
I'm using a CMS (Joomla), which automatically rewrites the URLs for me. I know that I named the folder like this:
/black / white/
And I know the URLs show up as:
/black-%10-white/
I just tried the %5c to see if that would work, but no dice. Is there any other way to try and kill this page? Right now, I think the system is 301ing it back to the index page (based on header checks).
If so, the 'raw' URL can be tested using one of
RewriteCond %{REQUEST_URI} ^/black-\%10-white/page-now-gone/ RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /black-\%10-white/page-now-gone/ so that you can 'find' the %10 sequence, and then follow that up with
RewriteRule ^black.+white/page-now-gone/ - [G] to produce a 410-Gone response.
(The extra step of using RewriteCond is required because the URL seen by RewriteRule is the localized and decoded URL, so the %10 won't be testable in RewriteRule itself.)
Jim