Forum Moderators: phranque

Message Too Old, No Replies

need to 410 about 2000+ non-existent files with same extension

is it doable?

         

walkman

1:01 am on Oct 9, 2005 (gmt 0)



Hi,
I have about 2500 pages on Google, that I deleted ages ago, yet Google loves to keep them. The bad part is that those pages actually show as indents sometimes and I lose money if a person clicks there.

All those files have the same extension, let's say
domain.com/blah-one-two where blah changes, sometimes it's in caps and sometimes it's two words so it has blah%20blah-one-two. The "-one-two" is the only pattern and it's unique. Can I rewrite it so, so next time Google looks for these files it finds error 410? I have heard that they will remove them after that.

If so, where can I start looking?

thanks in advance

ON EDIT:
I have this: RewriteRule ^$ [domain.com...] [R=301,L]
to redirect any /domain.com/?test to my index. Can I modify it to something like:

RewriteRule ^$ [domain.com...] [R=410,L]

It's important that only that extension is gone :)

jdMorgan

2:38 am on Oct 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If I understand you correctly, the proper syntax would be:

RewriteRule -one-two$ - [G]

This produces a 410-Gone response for any URL-path ending with "-one-two"

Jim

walkman

2:49 am on Oct 9, 2005 (gmt 0)



Thank you very much Jim.

Essentially I want Google to see that /anything-one-two is Gone /410.

RewriteEngine on
RewriteRule -one-two$ - [G,L]

will the L ruin it or it's needed?
UPDATE: It worked! The error message is displayed
thanks again

jdMorgan

3:32 am on Oct 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The [L] flag is not needed with [F], [G], [P], or [N]. See the mod_rewrite RewriteRule flags documentation.

Jim