Welcome to WebmasterWorld Guest from 54.146.221.231

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

.htaccess and AddHandler question

where to add the AddHandler code?

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

New User

10+ Year Member

joined:June 27, 2003
posts:14
votes: 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

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

New User

10+ Year Member

joined:June 27, 2003
posts:14
votes: 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.

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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Dec 16, 2002
posts:2010
votes: 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

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

New User

10+ Year Member

joined:June 27, 2003
posts:14
votes: 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.

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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Dec 16, 2002
posts:2010
votes: 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]

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

Senior Member from US 

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

joined:Sept 26, 2001
posts:5801
votes: 64



Try putting this above "RewriteEngine On"

Options +FollowSymLinks