Forum Moderators: phranque

Message Too Old, No Replies

410ing Dynamic URLs

Can't find a solution that fits this particular case...

         

BillyS

12:07 am on Jan 5, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Recent success has prompted me to fix a problem I had with PDF files that I no longer make available to users. The URLs are in the format:

[foo.tld...]

[foo.tld...]

I spent several hours trying to fix this one last night and I kept coming up with a 500 Error. All I want to do is send the search engine a 410. After careful research, this is what I tried:

Rewritecond %{query_string} ^option=com_content&do_pdf=$

RewriteRule ^(index\.php)?$ - [G]

Still no good. I've tried every combination I can think of, but it does not seem to work. My thought is the problem might be related to the index2.php part or the underscores.

Any help is deeply appreciated.

jdMorgan

12:16 am on Jan 5, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try this:

RewriteCond %{QUERY_STRING} ^option=com_content&do_pdf=
RewriteRule ^index2\.php$ - [G]

Consider reviewing the Regular Expressions Tutorial cited in our forum charter [webmasterworld.com], particularly the subject of pattern anchoring.

Jim

BillyS

2:30 am on Jan 5, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Jim -

This worked again. Thanks, much appreciated.