<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dw="https://www.dreamwidth.org">
  <id>tag:dreamwidth.org,2009-04-21:107589</id>
  <title>Tang's DW</title>
  <subtitle>tangaroa</subtitle>
  <author>
    <name>tangaroa</name>
  </author>
  <link rel="alternate" type="text/html" href="https://tangaroa.dreamwidth.org/"/>
  <link rel="self" type="text/xml" href="https://tangaroa.dreamwidth.org/data/atom"/>
  <updated>2012-09-02T19:30:22Z</updated>
  <dw:journal username="tangaroa" type="personal"/>
  <entry>
    <id>tag:dreamwidth.org,2009-04-21:107589:18831</id>
    <link rel="alternate" type="text/html" href="https://tangaroa.dreamwidth.org/18831.html"/>
    <link rel="self" type="text/xml" href="https://tangaroa.dreamwidth.org/data/atom/?itemid=18831"/>
    <title>RemoveHandler .pl .cgi</title>
    <published>2012-09-02T19:30:22Z</published>
    <updated>2012-09-02T19:30:22Z</updated>
    <category term="cgi"/>
    <category term="apache"/>
    <category term="computers"/>
    <category term="webdev"/>
    <category term="perl"/>
    <dw:security>public</dw:security>
    <dw:reply-count>0</dw:reply-count>
    <content type="html">&lt;p&gt;My website will have a directory where I do &lt;em&gt;not&lt;/em&gt; want CGIs to run. The obvious and wrong answer is to create an .htaccess file with "Options -ExecCGI", but that causes the errors "Access forbidden!" and "Options ExecCGI is off" when I try to access a .pl file. For the next obvious and wrong solution, I tried renaming the file to ".pl.txt". That did not work.&lt;/p&gt;

&lt;p&gt;Given that I would like to serve .pl files as plain text, I tried "&lt;a href="http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addtype"&gt;AddType&lt;/a&gt; text/plain .pl". &lt;a href="http://httpd.apache.org/docs/trunk/mod/mod_mime.html#removetype"&gt;RemoveType&lt;/a&gt; also does not work; note that the docs say that this is what you use for this case. &lt;a href="http://httpd.apache.org/docs/current/rewrite/flags.html#flag_t"&gt;RewriteRule \.pl$ - [T=text/plain]&lt;/a&gt; did not work; note, again, the docs say it should. 

&lt;p&gt;What did work was to add "&lt;a href="http://httpd.apache.org/docs/2.2/mod/mod_mime.html#removehandler"&gt;RemoveHandler&lt;/a&gt; .pl".&lt;/p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="https://www.dreamwidth.org/tools/commentcount?user=tangaroa&amp;ditemid=18831" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/&gt; comments</content>
  </entry>
</feed>
