<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Nancy.<br>
<br>
I haven't tested this, but try:<br>
<br>
<tt>&nbsp; RewriteCond %{REQUEST_URI}
^/index.php?q=cgi-bin/printOriginal\.pl&amp;file=.*$ [NC]<br>
&nbsp; RewriteRule ^/index.php?q=cgi-bin/printOriginal\.pl&amp;file=/(.*)$
/$1 [L,R=301]</tt><br>
<br>
And see if that can give you a place to start.&nbsp; The above assumes that
clean URLs will translate it to 'index.php?q=' later.&nbsp; This is so that
the 301 redirect (which google will remember) will be to a Clean URL.&nbsp;
If not desired to function like this, you can change the last "/$1" in
the above example to: "/index.php?q=$1" .<br>
<br>
You can throw some "RewriteCond %{HTTP_HOST}" lines in there too and
change those also if you want to preserve the SEO value of links to old
domains as well, but that's probably a topic for another list, I'd
guess.<br>
<br>
Seth<br>
<br>
(A google search for "printOriginal.pl" turned up a few momsteam.com
links.)<br>
<br>
Nancy Wichmann wrote:
<blockquote cite="mid:003101ca623f$ba0cc060$2e264120$@net" type="cite">
  <meta http-equiv="Content-Type" content="text/html; ">
  <meta name="Generator" content="Microsoft Word 12 (filtered medium)">
  <style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Comic Sans MS";
        panose-1:3 15 7 2 3 3 2 2 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Arial","sans-serif";
        color:windowtext;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Arial","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
  </style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
  <div class="Section1">
  <p class="MsoNormal"><span
 style="font-size: 12pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; color: rgb(31, 73, 125);">Wow,
how did you know about MomsTeam (now YouthSportsParents)?<o:p></o:p></span></p>
  <p class="MsoNormal"><span
 style="font-size: 12pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span
 style="font-size: 12pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; color: rgb(31, 73, 125);">I
put this in there already &nbsp;&nbsp;&nbsp;</span><span
 style="font-size: 12pt; font-family: &quot;Courier New&quot;; color: black;">RewriteRule
^cgi-bin/printOriginal.pl/$ <a class="moz-txt-link-freetext" href="http://www.youthsportsparents.com">http://www.youthsportsparents.com</a> [R=301,L]</span><span
 style="font-size: 12pt; font-family: &quot;Courier New&quot;; color: rgb(31, 73, 125);"><o:p></o:p></span></p>
  <p class="MsoNormal"><span
 style="font-size: 12pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; color: rgb(31, 73, 125);">And
I am still seeing these come through to the Drupal log.<o:p></o:p></span></p>
  <p class="MsoNormal"><span
 style="font-size: 12pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span
 style="font-size: 12pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; color: rgb(31, 73, 125);">There
might be a clue in RewriteRule </span><span
 style="font-size: 12pt; font-family: &quot;Courier New&quot;; color: black;">^alpha/sports/(.*)
<a class="moz-txt-link-freetext" href="http://www.youthsportsparents.com/sports/$1">http://www.youthsportsparents.com/sports/$1</a> [R=301,L]</span><span
 style="font-size: 12pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; color: rgb(31, 73, 125);">
if I
really understood regular [sic] expressions.<o:p></o:p></span></p>
  <p class="MsoNormal"><span
 style="font-size: 12pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <div>
  <div>
  <p class="MsoNormal"><span
 style="font-size: 14pt; font-family: &quot;Comic Sans MS&quot;; color: fuchsia;">Nancy
E. Wichmann, PMP </span><span style="color: rgb(31, 73, 125);">&nbsp;<o:p></o:p></span></p>
  </div>
  <p class="MsoNormal"><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(31, 73, 125);">Injustice
anywhere is a threat to justice everywhere. -- Dr.
Martin L. King, Jr</span><span
 style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; color: rgb(31, 73, 125);">.</span><span
 style="color: rgb(31, 73, 125);"><o:p></o:p></span></p>
  </div>
  <p class="MsoNormal"><span
 style="font-size: 12pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <div>
  <div
 style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;">
  <p class="MsoNormal"><b><span
 style="font-size: 10pt; font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;; color: windowtext;">From:</span></b><span
 style="font-size: 10pt; font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;; color: windowtext;">
<a class="moz-txt-link-abbreviated" href="mailto:development-bounces@drupal.org">development-bounces@drupal.org</a>
[<a class="moz-txt-link-freetext" href="mailto:development-bounces@drupal.org">mailto:development-bounces@drupal.org</a>] <b>On Behalf Of </b>Seth
Freach<br>
  <b>Sent:</b> Tuesday, November 10, 2009 11:26 AM<br>
  <b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:development@drupal.org">development@drupal.org</a><br>
  <b>Subject:</b> Re: [development] Can .htaccess discard part of a
path?<o:p></o:p></span></p>
  </div>
  </div>
  <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
  <p class="MsoNormal">Nancy,<br>
  <br>
I'm assuming this is a leftover from the moms team site?&nbsp; The incoming
requests are coming from the fact that Google appears to have lots of
these
links in its index still to these URLs and sites which still link to
these
URLs.<br>
  <br>
Instead of a rewrite, I'd suggest a a response code 301 redirect.&nbsp; This
will be more Google friendly.<br>
  <br>
look in the default .htaccess file for the (commented out by default)
lines
that deal with www. redirection (ie, you always want people to see
"www" or never do, regardless of how they access the site.)&nbsp;
Using those patterns should help show you how to redirect to the same
content
but without the "<span style="font-family: &quot;Courier New&quot;;">cgi-bin/printOriginal.pl&amp;file=/</span>"<br>
  <br>
Seth<br>
  <br>
  <br>
Nancy Wichmann wrote: <o:p></o:p></p>
  <p class="MsoNormal"><span
 style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;">I
am getting lots of requests like this:</span><o:p></o:p></p>
  <p class="MsoNormal" style="margin-bottom: 5pt;"><span
 style="font-size: 12pt; font-family: &quot;Courier New&quot;;"><a
 moz-do-not-send="true"
 href="http://www.example.com/index.php?q=cgi-bin/printOriginal.pl&amp;file=/alpha/beta/gamma/rage_prevention.shtml">http://www.example.com/index.php?q=cgi-bin/printOriginal.pl&amp;file=/alpha/beta/gamma/rage_prevention.shtml</a></span><o:p></o:p></p>
  <p class="MsoNormal" style="margin-bottom: 5pt;"><span
 style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">The
file argument is a valid page on our
old site and is itself redirected with a ReWriteRule in .htaccess.
However,
cgi-bin/printOriginal.pl does not exist and I have no idea what it was
supposed
to do (well, I can guess print the page). We get lots of these requests
for
different pages. I have tried a simple rewrite rule and a URL alias to
prevent
the 404 processing, but neither has fixed it.</span><o:p></o:p></p>
  <p class="MsoNormal" style="margin-bottom: 5pt;"><span
 style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">Is it
possible to design a rewriterule that
essentially discards the "cgi-bin/printOriginal.pl" and just serves
up the requested page (well, after its own rewrite rule has worked)? So
this
would become</span><o:p></o:p></p>
  <p class="MsoNormal" style="margin-bottom: 5pt;"><span
 style="font-size: 12pt; font-family: &quot;Courier New&quot;;"><a
 moz-do-not-send="true"
 href="http://www.example.com/index.php/alpha/beta/gamma/rage_prevention.shtml">http://www.example.com/index.php/alpha/beta/gamma/rage_prevention.shtml</a></span><o:p></o:p></p>
  <p class="MsoNormal"><span
 style="font-size: 12pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;">&nbsp;</span><o:p></o:p></p>
  <p class="MsoNormal"><span
 style="font-size: 12pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;">&nbsp;</span><o:p></o:p></p>
  <div>
  <p class="MsoNormal"><span
 style="font-size: 14pt; font-family: &quot;Comic Sans MS&quot;; color: fuchsia;">Nancy
E. Wichmann, PMP </span><o:p></o:p></p>
  </div>
  <p class="MsoNormal"><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">Injustice
anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr</span><span
 style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;">.</span><o:p></o:p></p>
  <p class="MsoNormal">&nbsp;<o:p></o:p></p>
  <p><span
 style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; color: windowtext;">No
virus found in this incoming message.<br>
Checked by AVG - <a class="moz-txt-link-abbreviated" href="http://www.avg.com">www.avg.com</a><br>
Version: 9.0.704 / Virus Database: 270.14.59/2494 - Release Date:
11/10/09
02:38:00</span><span style="color: windowtext;"><o:p></o:p></span></p>
  </div>
</blockquote>
</body>
</html>