Re: Redirect, Rewrite and php.ini

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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!

- Are there any other rules in the file?
- Are there any other .htaccess files in parent directories of this one?
- Does your ISP do anything special with this type of file?
- Are you sure you got the rules and responses the right way round in
your last post?

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

noodl (given up fighting against your top-posting)

On 04/07/07, Senén de Diego <senen@xxxxxxxxxxxxx> 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@xxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




--
noodl

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux