homepage Welcome to WebmasterWorld Guest from 54.234.2.94
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
.htaccess and AddHandler question
where to add the AddHandler code?
hollywoodn




msg:1502905
 3:01 am on Oct 7, 2003 (gmt 0)

Script Error
The script did not produce proper HTTP headers. Please see the error log to see the detail of the errors. Depending on the server configuration, you can also run this script under CGIWrap debugging. Usually, either rename or link the script temporarily to a file which ends with .cgid extension, or add a AddHandler cgi-script-debug .cgi line to your .htaccess file.

I'm getting the above error trying to run awstats.

where in my .htaccess file do I add the AddHander cgi-script-debug code?

thanks

 

hollywoodn




msg:1502906
 3:11 am on Oct 7, 2003 (gmt 0)

is this correct? just put it on the bottom?

RewriteEngine On
RewriteCond %{HTTP_REFERER}!^http://www.XX.com [NC]
RewriteCond %{HTTP_REFERER}!^http://XX.com [NC]
RewriteCond %{HTTP_REFERER}!^http://www.XX.com [NC]
RewriteCond %{HTTP_REFERER}!^http://XX.com [NC]
RewriteRule [^/]+.(gif¦jpg)$ - [F]
Options -indexes
AddHandler cgi-script .cgi

and this is the error forcing me to change my .htaccess file >>>>

Script Error
The script did not produce proper HTTP headers. Please see the error log to see the detail of the errors. Depending on the server configuration, you can also run this script under CGIWrap debugging. Usually, either rename or link the script temporarily to a file which ends with .cgid extension, or add a AddHandler cgi-script-debug .cgi line to your .htaccess file.

amznVibe




msg:1502907
 3:31 am on Oct 7, 2003 (gmt 0)

try adding this:
AddType application/x-httpd-cgi .cgi .pl

In theory you can put it just about anywhere. I happen to put mine before all the rewrites

hollywoodn




msg:1502908
 3:42 am on Oct 7, 2003 (gmt 0)

no go I added it as below >>

RewriteEngine On
RewriteCond %{HTTP_REFERER}!^http://www.XX.com [NC]
RewriteCond %{HTTP_REFERER}!^http://XX.com [NC]
RewriteCond %{HTTP_REFERER}!^http://www.XX.com [NC]
RewriteCond %{HTTP_REFERER}!^http://XX.com [NC]
RewriteRule [^/]+.(gif¦jpg)$ - [F]
AddType application/x-httpd-cgi .cgi .pl
Options -indexes

and got this >>

Script Error
The script did not produce proper HTTP headers. Please see the error log to see the detail of the errors. Depending on the server configuration, you can also run this script under CGIWrap debugging. Usually, either rename or link the script temporarily to a file which ends with .cgid extension, or add a AddHandler cgi-script-debug .cgi line to your .htaccess file.

amznVibe




msg:1502909
 2:27 am on Oct 8, 2003 (gmt 0)

Actually you may be mislead by that error which could have nothing to do with how your htaccess is setup, its a very broad message (if you google for it, you will see it everywhere). You are probably setup fine for cgi.

The number of errors you could run into for awstats is so broad, you might be best off checking their support forums [sourceforge.net]?
Also don't forget their faq and troubleshooting section [awstats.sourceforge.net]

keyplyr




msg:1502910
 6:13 am on Oct 8, 2003 (gmt 0)


Try putting this above "RewriteEngine On"

Options +FollowSymLinks

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved