homepage Welcome to WebmasterWorld Guest from 54.211.97.242
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
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

10+ Year Member



 
Msg#: 410 posted 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

10+ Year Member



 
Msg#: 410 posted 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

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 410 posted 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

10+ Year Member



 
Msg#: 410 posted 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

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 410 posted 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

WebmasterWorld Senior Member keyplyr us a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



 
Msg#: 410 posted 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