+ Reply to Thread
Results 1 to 4 of 4

Thread: GZip enabled on starka?

  1. #1
    wolf99 is offline x10Hosting Member wolf99 is an unknown quantity at this point
    Join Date
    Apr 2010
    Posts
    33

    GZip enabled on starka?

    Hi folks

    I have a free acc on starka, and amm wondering if gzip OR deflate is enabled?

    I have tried the htaccess code reccomended here: [.HTACCESS]GZIP compression your pages

    but according to the test at http://www.whatsmyip.org/http_compression/ my content is not compressed....

    thanks

  2. #2
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: GZip enabled on starka?

    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

  3. #3
    wolf99 is offline x10Hosting Member wolf99 is an unknown quantity at this point
    Join Date
    Apr 2010
    Posts
    33

    Re: GZip enabled on starka?

    so basically, the answer is no, use PHP, yeah?

    can you tell me, is correct usage:

    PHP Code:
    <?php

    ob_start
    ("ob_gzhandler");

    ?>
    <html>
    <body>
    <p>This should be a compressed page.</p>
    </html>
    <body>
    thanks

    EDIT: how can this be applied in the case of non .phph files? for eg. font files for @font-face?
    Last edited by wolf99; 05-25-2010 at 01:26 PM.

  4. #4
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: GZip enabled on starka?

    You could write a script that does nothing but output another file. For example,
    PHP Code:
    <?php
    ob_start
    ('ob_gzhandler');

    // init.php does useful things like set the include path
    include_once($_SERVER['DOCUMENT_ROOT'] . '/init.php');

    // You'll need to write the sanitize function so that users can't view arbitrary files
    $file sanitize($_REQUEST['path']);
    if (
    file_exists($file)) {
        
    $type content_type($file);
        
    header('Content-type: ' $type);
        
    // output any other headers you want to send
        
    if (strpos($type'text/') == 0) {
            
    // as another safety feature, use a sub-request to fetch any 'text/*' files,
            // in case the file is a script. You could write a more restrictive test to skip
            // files that aren't scripts.
            
    virtual($_REQUEST['path']));
        } else {
            
    readfile($file);
        }
    } else {
        
    header('HTTP/1.0 404 Not Found');
        
    // or wherever your custom 404 doc is located
        
    include('errordocs/404.php');
    }
    Redirect URLs for allowed types through the compression script. As the last rewrite rule in your top-level .htaccess, put:
    Code:
    RewriteRule ^/?(.*\.(html|css|js|png|gif|jpg))$ /path/to/gz.php?path=/$1 [QSA,NS]
    Note that this will circumvent any rewrite rules in subdirectories.
    Last edited by misson; 05-25-2010 at 06:51 PM.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

+ Reply to Thread

Similar Threads

  1. Gzip
    By kmarkiv in forum Free Hosting
    Replies: 6
    Last Post: 12-19-2009, 11:10 AM
  2. Shared ssl NOT ENABLED ON SERVER STARKA
    By subhanja in forum Free Hosting
    Replies: 8
    Last Post: 10-26-2009, 11:53 AM
  3. gzip backup
    By theascended in forum Free Hosting
    Replies: 4
    Last Post: 02-27-2009, 09:21 AM
  4. Gzip
    By 3aKaT in forum Feedback and Suggestions
    Replies: 8
    Last Post: 10-14-2006, 09:36 PM
  5. Why no gzip?
    By noerrorsfound in forum Free Hosting
    Replies: 0
    Last Post: 05-27-2006, 11:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers