Welcome to WebmasterWorld Guest from 50.16.112.199

Forum Moderators: Ocean10000 & incrediBILL & phranque

.htaccess and AddHandler question

where to add the AddHandler code?

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

10+ Year Member



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)

10+ Year Member



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)

WebmasterWorld Senior Member 10+ Year Member



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)

10+ Year Member



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)

WebmasterWorld Senior Member 10+ Year Member



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)

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




Try putting this above "RewriteEngine On"

Options +FollowSymLinks

 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month