Forum Moderators: phranque
GET /Bio/alaska/faq/stock/stock/alaska/journal/eagles/stock/thumbnails-79-Banff-National-Park-photos.html
GET /Bio/copyright/faq/stock/alaska/stock/index-17.html
GET /Bio/alaska/stock/stock/stock/alaska/portfolio/landscapes/stock/thumbnails-17-Small-Mammals-Photos.html RedirectMatch 301 ^/Bio/ http://www.skolaiimages.com/bio/index.html User-Agent: *
Crawl-delay: 30 The directory Bio doesn't exist, is now 'bio'
RedirectMatch 301 ^/Bio/ http://www.example.com/bio/index.html
"That is, never mind what it's wearing: does it come from a bing/msn IP?"
"Do you mean that it used to exist? Then a 410 would seem to be in order. Do not repeat not redirect a whole bunch of files to a single index file unless you've got a ### good reason.
"The syntax in mod_alias is simply
RedirectMatch 410 {filename} ... and then nothing. You're redirecting into thin air. "
Never ever ever use the name "index.html" (or .php or whatever). The name of a directory is / as in
"http://www.example.com/bio/ "
"Which reminds me: You should detour at this point to read some of those fine-print links at the top of the page-- Forums Charter and so on-- which will, among other things, explain about example.com. You probably noticed one of those problems while composing your post. "
Does your htaccess currently contain only mod_alias directives (Redirect or RedirectMatch by that name)? If so, you are OK. But if you've got anything using mod_rewrite-- whether it ends up a rewrite or redirect doesn't matter-- change everything to mod_rewrite. Otherwise you're just asking for trouble. "
RewriteCond %{HTTP .... # BEGIN WPSuperCache
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
#If you serve pages from behind a proxy you may want to change 'RewriteCond %{HTTPS} on' to something more sensible
RewriteCond %{REQUEST_URI} ....... Disallow: /Bio/ 65.52.108.58 - - [24/Apr/2012:09:23:56 -0700] "GET /Bio/alaska/bio/stock/stock/stock/wildlife/stock/thumbnails-17-Small-Mammals-Photos.html HTTP/1.1" 301 - "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
157.55.17.193 - - [24/Apr/2012:09:39:22 -0700] "GET /Bio/alaska/bio/stock/stock/contact/resources/stock/bio/index.html HTTP/1.1" 301 - "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
157.55.17.193 - - [24/Apr/2012:09:45:34 -0700] "GET /Bio/alaska/bio/stock/stock/stock/eagles/stock/thumbnails-13-Grizzly-Bears-Photos.html HTTP/1.1" 301 - "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)" RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)\.(html|ico|jpg|png|gif|js|css)$ - [G,L] <IfModule mod_rewrite.c>
If I Redirect 410, isn't that going to continue to generate 404 errors?
RewriteRule ^Bio - [G] RewriteCond %{REQUEST_FILENAME} !-f section as well, or just the line starting RewriteRule? Top-level directory, so no leading slash.
Now, about index.html ....
or starters, get rid of all those <IfModule... envelopes. Not their contents, just the envelopes themselves.
<IfModule mod_rewrite.c> I can/should remove? If you've got a lot of Redirects in place, you can even run up a sort of meta-RegEx to change everything in one fell swoop. .... snip ….
Redirect 301 /stock/thumbnails-51-Bald http://www.skolaiimages.com/stock/thumbnails-51-Bald-Eagle-Photos.html RewriteRule ^stock/thumbnails-42-Songbirds-an$ http://www.skolaiimages.com/stock/thumbnails-42-Songbirds-and-Passerines-photos.html [R=permanent,L] do you have a recommendation for an "intelligent code-aware text editor" for mac?
RewriteRule ^Bio - [G]
Do I remove the RewriteCond %{REQUEST_FILENAME} !-f section as well, or just the line starting RewriteRule?
Top-level directory, so no leading slash.
So "top-level directory" means the first level inside the root, correct? Like www.example.com/Bio/ etc?
so anything that says <IfModule mod_rewrite.c> I can/should remove?
This section should only be used if you need to have one configuration file that works whether or not a specific module is available. In normal operation, directives need not be placed in <IfModule> sections.
This directive [<IfModule>] should only be used if you need your configuration file to work whether or not certain modules are installed. It should not be used to enclose directives that you want to work all the time, because it can suppress useful error messages about missing modules.
Redirect 301 /stock/thumbnails-42-Songbirds-an http://www.examplesite.com/stock/thumbnails-42-Songbirds-and-Passerines-photos.html RewriteRule ^stock\/thumbnails\-42\-Songbirds\-an$ "http\:\/\/www\.examplesite\.com\/stock\/thumbnails\-42\-Songbirds\-and\-Passerines\-photos\.html" [R=301] RewriteCond %{HTTP_HOST} ^mysite$ [OR]
RewriteCond %{HTTP_HOST} ^www.mysite.com$
RewriteRule ^alaska\/denali\.html$ "http\:\/\/www\.mysite\.com\/alaska\/denali\-photos\.html" [R=301,L]
RewriteCond %{HTTP_HOST} ^skolaiimages.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.skolaiimages.com$
RewriteRule ^alaska\/wrangells\.html$ "http\:\/\/www\.mysite\.com\/alaska\/wrangell\-st\-elias\-photos\.html" [R=301,L]
RewriteRule ^stock\/thumbnails\-42\-Songbirds\-an$ "http://www.skolaiimages.com/stock/thumbnails-42-Songbirds-and-Passerines-photos.html" [R=301, L] RewriteRule ^Bio - [G] Is there a way for me to tell if that is working correctly? What should happen when I try to go to one of the urls being 410 redirected (or however it's called) .... I still get a 404.
I found out that the 410 error document didn't actually exist, which is why the 404 was still being served
website.com/folder/file-name.html%3Cbr%20/%3E50 # RewriteRule ^folder\/file-name\.html(.*)$ http://www.website.com/folder/file-name.html [R,L]