View previous topic :: View next topic |
Author |
Message |
cmxflash -
Joined: 11 Dec 2004 Posts: 872
|
Posted: Wed May 31, 2006 11:27 pm Post subject: Great job with the new version |
|
|
FastCGI rocks. My server is a lot faster, and it seems to be working pretty good. I haven't had any trouble with PHP yet, at least.
Anyway, in the "new features", I saw something named 'Custom HTTP headers'. What does it do? I can't find it in the console. |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Thu Jun 01, 2006 12:08 pm Post subject: Re: Great job with the new version |
|
|
cmxflash wrote: | FastCGI rocks. My server is a lot faster, and it seems to be working pretty good. I haven't had any trouble with PHP yet, at least.
Anyway, in the "new features", I saw something named 'Custom HTTP headers'. What does it do? I can't find it in the console. |
Thank you for your postive feedback about this new release.
The custom HTTP headers are in Console > Hosts - Configure > General > Advanced Parameters.
You can use them to add custom HTTP headers to some responses. There have several possible uses:
* Example one: you want to disable any caching for all your *.jpg files so that browsers always ask your server for them when needed: Add a Custom HTTP header which virtual path is /*.jpg, header name is Cache-Control and header value is no-cache .
* Example two: you have a large file /pages/large.html that you want to precompress and serve as Gzip compressed HTTP streams. Compress the file using Gzip, and rename large.html.gz to large.html (it's not actually a HTML file, but a compressed HTML file and here's the trick). Now add a new custom header such as:
- Virtual Path = /pages/large.html
- Header Name = Content-Encoding
- Header Value = gzip _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Thu Jun 01, 2006 10:02 pm Post subject: |
|
|
Here's something cool you can do also.
- Virtual Path = /images/file.jpg
- Header Name = Content-Type
- Header Value = application/force-download
This will prompt you to download the JPEG instead of showing it on the browser,
which can also be useful for promping other files to be downloaded.
Last edited by TRUSTAbyss on Sun Sep 24, 2006 1:20 pm; edited 1 time in total |
|
Back to top |
|
|
pkSML -
Joined: 29 May 2006 Posts: 952 Location: Michigan, USA
|
Posted: Sat Jun 10, 2006 3:31 am Post subject: Variables in custom headers? |
|
|
Hi Aprelium.
I was wondering if variables could be inserted into the custom headers, such as date and time variables or environmental variables. _________________ Stephen
Need a LitlURL?
http://CodeBin.yi.org |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Sat Jun 10, 2006 4:23 pm Post subject: Re: Variables in custom headers? |
|
|
pkSML,
This is not yet possible but we'll add this feature in the next version (we're already working on it). _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
cmxflash -
Joined: 11 Dec 2004 Posts: 872
|
Posted: Sat Jun 17, 2006 9:58 pm Post subject: Re: Variables in custom headers? |
|
|
pkSML wrote: | Hi Aprelium.
I was wondering if variables could be inserted into the custom headers, such as date and time variables or environmental variables. |
That can already be done by using the header()-function in PHP.
Code: | <?php
header("server: " . time());
?> |
Eh, not so useful. Just an example. |
|
Back to top |
|
|
pkSML -
Joined: 29 May 2006 Posts: 952 Location: Michigan, USA
|
Posted: Sun Jun 18, 2006 12:37 am Post subject: |
|
|
Thanks for the information, cmxflash.
I'm actually considering switching my site over to PHP if I can set up a dedicated server computer on my network. Hope, hope...! _________________ Stephen
Need a LitlURL?
http://CodeBin.yi.org |
|
Back to top |
|
|
|