httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Senén de Diego <se...@electrodh.com>
Subject Re: [users@httpd] Redirect, Rewrite and php.ini
Date Thu, 05 Jul 2007 17:51:53 GMT
I've asked again our hosting provider about this and their (highly 
irritating) answer has been:

"We are sorry however we do not provide coding or scripting support 
through this forum. Mod_rewrite works just fine on our servers and your 
question about AllowOverride goes in the php.ini. You can find this and 
more information by performing a search on your favorite search engine."

That is, "look in Google..." What a support service!. And they keep 
insisting I can solve this in php.ini.
I'm running out of (polite) arguments with this people and before 
starting to be unpolite whit them I would like to ask you to confirm me 
that this really has nothing to do with php.ini.



Senén de Diego escribió:
> I'm worried about your head, please take care...
>
> Vincent Bray escribió:
>> This is making my head spin. The only time the jnlp file is served is
>> when it's not requested and not rewriten to? That makes no sense!
> I'm not sure I understand you here. There is no jnlp file, there is 
> only a php file.
> If I request sincronizar1.html (with a rewrite rule from 
> sincronizar1.html to sincronizar.php) I get what I expect (the php).
> But if I request sincronizar1.jnlp (with a rewrite rule from 
> sincronizar1.jnlp to sincronizar.php) I get an error.
>>
>> - Are there any other rules in the file?
> No
>> - Are there any other .htaccess files in parent directories of this one?
> No
>> - Does your ISP do anything special with this type of file?
> Who knows...
>> - Are you sure you got the rules and responses the right way round in
>> your last post?
> Cut and paste.
>>
>> .. unless I'm missing the point and your php script is sending the
>> "application/x-java-jnlp-file" content type? If that's the case,
>> perhaps your rewrite to the static jnlp file just gets the path wrong,
>> maybe due to a trailing space in the filename?
> This is the php file:
> <?php
> header("Expires: 0");
> header("Content-Type: application/x-java-jnlp-file");
> readfile("sincronizar-1.1.3.jnlp");
> ?>
>
> Before you ask, the file sincronizar-1.13.jnlp does exist (in the same 
> folder).
>
> By the way, I've done several more tests and:
> RewriteRule ^test\.gif$ sincronizar.php (does work)
> RewriteRule ^test\.jpg$ sincronizar.php (does work)
> RewriteRule ^test\.ktm$ sincronizar.php (ktm is an inexistent type, as 
> far as I know. This does NOT work)
>
> I've test an url ending in .ktm to see if this can be related to 
> known/unknown MIME types (although when I request a real jnlp file, I 
> get the right Content-Type in the headers).
>
>
>>
>> noodl (given up fighting against your top-posting)
>>
>> On 04/07/07, Senén de Diego <senen@electrodh.com> wrote:
>>> I've done some tests adding the header "Control-Cache: no-cache" to the
>>> requests (using LiveHttpHeaders plugin in Firefox) and (I think) the
>>> proxy caches can be discarded as the origin of the problem.
>>>
>>> With this rewrite rule (jnlp):
>>> -- 
>>> RewriteBase /herramientas/
>>> RewriteRule ^sincronizar1\.jnlp$ sincronizar.php
>>> -- 
>>> and this request:
>>> -- 
>>> GET /herramientas/sincronizar1.jnlp HTTP/1.1
>>> Host: www.electrodh.com
>>> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; es-ES; rv:1.8.1.4)
>>> Gecko/20070515 Firefox/2.0.0.4
>>> Accept:
>>> text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5

>>>
>>> Accept-Language: es-es,es;q=0.8,ca;q=0.6,en;q=0.4,de;q=0.2
>>> Accept-Encoding: gzip,deflate
>>> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
>>> Keep-Alive: 300
>>> Connection: keep-alive
>>> Cache-Control: no-cache
>>> -- 
>>> this is the response (error 404):
>>> -- 
>>> HTTP/1.x 404 /herramientas/sincronizar1.jnlp
>>> Date: Wed, 04 Jul 2007 15:44:39 GMT
>>> Server: Apache
>>> Etag: W/"1683-1163381719000"
>>> Last-Modified: Mon, 13 Nov 2006 01:35:19 GMT
>>> Content-Type: text/html
>>> Content-Length: 1683
>>> Keep-Alive: timeout=15, max=100
>>> Connection: Keep-Alive
>>> -- 
>>>
>>> But, with this rewrite rule (html):
>>> -- 
>>> RewriteBase /herramientas/
>>> RewriteRule ^sincronizar1\.html$ sincronizar.php
>>> -- 
>>> and this request:
>>> -- 
>>> GET /herramientas/sincronizar1.html HTTP/1.1
>>> Host: www.electrodh.com
>>> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; es-ES; rv:1.8.1.4)
>>> Gecko/20070515 Firefox/2.0.0.4
>>> Accept:
>>> text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5

>>>
>>> Accept-Language: es-es,es;q=0.8,ca;q=0.6,en;q=0.4,de;q=0.2
>>> Accept-Encoding: gzip,deflate
>>> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
>>> Keep-Alive: 300
>>> Connection: keep-alive
>>> Cache-Control: no-cache
>>> -- 
>>> this is the response:
>>> -- 
>>> HTTP/1.x 200 OK
>>> Date: Wed, 04 Jul 2007 15:51:38 GMT
>>> Server: Apache
>>> Expires: 0
>>> Keep-Alive: timeout=15, max=100
>>> Connection: Keep-Alive
>>> Transfer-Encoding: chunked
>>> Content-Type: application/x-java-jnlp-file
>>> X-Antivirus: avast! 4
>>> X-Antivirus-Status: Clean
>>>
>>> -- 
>>>
>>> So, *.html urls are rewriten, but *.jnlp urls aren't.
>>>
>>> Vincent Bray escribió:
>>> > On 03/07/07, Senén de Diego <senen@electrodh.com> wrote:
>>> >> The only difference between
>>> >> RewriteRule ^sincronizar\.jnlp$ sincronizar.php
>>> >> and
>>> >> RewriteRule ^sincronizar\.html$ sincronizar.php
>>> >> is that the file sincronizar.jnlp exists, and sincronizar.htm 
>>> doesn't
>>> >> (but if I remove sincronizar.jnlp nothing changes).
>>> >
>>> > That doesn't help to determine why you get 500 only for certain 
>>> files.
>>> > Are you able to read the access and error logs? If so, tail them for
>>> > both sets of requests to make sure the request is getting through. By
>>> > cache, I was refering to an upstream (transparent) proxy cache rather
>>> > than a browser's, and your SamSpade maybe not be sending the relevant
>>> > headers to bypass those (must-revalidate etc.)
>>> >
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>>
>>>
>>
>>
>
> ---------------------------------------------------------------------
> 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
>
>
>

---------------------------------------------------------------------
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