[development] Can .htaccess discard part of a path?

David Metzler metzlerd at metzlerd.com
Wed Nov 11 04:55:39 UTC 2009


I know this might sound crazy, but you ming consider a custom module  
that responds to cgi-bin and decides what to do from there.  Or one  
that responds to cgi-bin/printOriginal.pl.    Then you don't have to  
work out funky rewrite logic, and you can decide what to do from there.

I've done some pretty crazy custom modules.... even wrote one once  
that generated dynamic css :)
On Nov 10, 2009, at 8:08 AM, Nancy Wichmann wrote:

> I am getting lots of requests like this:
> http://www.example.com/index.php?q=cgi-bin/printOriginal.pl&file=/ 
> alpha/beta/gamma/rage_prevention.shtml
> 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.
> 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
> http://www.example.com/index.php/alpha/beta/gamma/ 
> rage_prevention.shtml
>
>
> Nancy E. Wichmann, PMP
> Injustice anywhere is a threat to justice everywhere. -- Dr. Martin  
> L. King, Jr.
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20091110/c476de79/attachment.html 


More information about the development mailing list