httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ruben Lihet <evil...@gmail.com>
Subject Re: [users@httpd] cgi http complete header
Date Thu, 16 Apr 2009 14:07:09 GMT
please... help  ?
How canI get rid of the extra http headers apache is sending ?

2009/4/16 Ruben Lihet <evilpus@gmail.com>:
> I managed to get rid of the .htacces error. I had to add a
> RedirectBase /cgi-bin directive to the .htacces and now it's working.
> But another problem occured.
>
> Now because mod_rewrite is rewriting my url, the nph prefix for my
> script is ignored, so apache add his own header like this:
>
> HTTP/1.1 200 OK
> Date: Mon, 06 Apr 2009 23:58:47 GMT
> Server: Apache/2.2.3 (CentOS)
> Content-Length: 0
> Connection: close
> Content-Type: text/plain; charset=UTF-8
>
> How can I use mod_rewrite to pass the request-header to the nph-cgi
> and my script preserve its nph properties ?
>
>
> 2009/4/15 Ruben Lihet <evilpus@gmail.com>:
>> Okay, so ..
>> I made a little test. In the same directory with my cgi script I write
>> a .htaccess file containig this:
>>
>> Allow from all
>> Options +FollowSymLinks
>> RewriteEngine on
>> RewriteRule ^([^/\.]+)/?$ nph-main.cgi?lid=$1&header=%{HTTP:Range}
>>
>> The problem now is that when I call the script like this:
>> http://web.devel/cgi-bin/rs/24333/
>>
>> the browser says:
>>
>> Not Found
>> The requested URL /var/www/cgi-bin/rs/nph-main.cgi was not found on this server
>>
>> which I find very strange because the script is there. Another thing I
>> noticed is that apache logs this error:
>>
>> [Tue Apr 07 00:59:08 2009] [error] [client 192.168.18.1] File does not
>> exist: /var/www/html/var
>>
>> Any hints what could it be ?
>> Thanks again!
>>
>>
>> 2009/4/15 Ruben Lihet <evilpus@gmail.com>:
>>> great, thanks, than I'll stick to mod_rewrite and do some digging in the docs!
>>>
>>> 2009/4/15 André Warnier <aw@ice-sa.com>:
>>>> Ruben Lihet wrote:
>>>>>
>>>>> OK, but can mod_rewrite read the http-header ?
>>>>
>>>> That's exactly what Eric suggested.
>>>>
>>>> mod_rewrite reads the http header, and copies its content to an environment
>>>> value, which your cgi program can just obtain from its running environment.
>>>>
>>>> ---------------------------------------------------------------------
>>>> The official User-To-User support forum of the Apache HTTP Server Project.
>>>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>>>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>>>  "   from the digest: users-digest-unsubscribe@httpd.apache.org
>>>> For additional commands, e-mail: users-help@httpd.apache.org
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Lihet Ruben
>>> Tel: +40 746 037 017
>>> email: lihet.ruben@gmail.com, evilpus@gmail.com
>>> Web: http://www.faultlessp.net/
>>>
>>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message