+ Reply to Thread
Results 1 to 5 of 5

Thread: Best way to compress the HTTP?

  1. #1
    purpler is offline x10Hosting Member purpler is an unknown quantity at this point
    Join Date
    Mar 2010
    Posts
    13

    Best way to compress the HTTP?

    Hi, i need to know hat is the best way to compress the HTTP traffic via .htaccess.
    I tried:


    Code:
    php_flag zlib.output_compression On
    - Gives me Error 500

    Code:
    php_value zlib.output_compression  On
    - Gives me Error 500

    Code:
    <ifModule mod_gzip.c>
    mod_gzip_on Yes
    mod_gzip_dechunk Yes
    mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
    mod_gzip_item_include handler ^cgi-script$
    mod_gzip_item_include mime ^text/.*
    mod_gzip_item_include mime ^application/x-javascript.*
    mod_gzip_item_exclude mime ^image/.*
    mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
    </ifModule>
    - Seems to not work, tested with several online gzip check services.

    Code:
    SetOutputFilter DEFLATE
    - Seems to not work

    Only thing that worked is to handle all HTML files by PHP:

    #put this in .htaccess
    Code:
    AddHandler application/x-httpd-php5 .html
    #put this before any code in every HTML page:
    Code:
    <?php ob_start( 'ob_gzhandler' );?>
    Please help me and clear up a bit what is the best working solution here at x10hosting.com and generally!
    Thanks in advance!

  2. #2
    Zubair's Avatar
    Zubair is offline x10 Super Spammer Zubair has a reputation beyond reputeZubair has a reputation beyond reputeZubair has a reputation beyond repute
    Join Date
    Jul 2009
    Location
    Pakistan
    Posts
    8,747

    Re: Best way to compress the HTTP?

    ***Moved to Programming Help***
    Zubair Barkat | Level 2 Tech
    █ 888-X10-9668 - zubair[@]x10hosting.com
    x10Hosting - Giving Away Hosting Since 2004

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

    Re: Best way to compress the HTTP?

    If you had searched the forum for your topics of interest, you would have discovered that setting php options in .htaccess isn't supported on free hosts, and that you can try the mod_gzip config options.
    Last edited by misson; 05-13-2010 at 04:37 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.

  4. #4
    purpler is offline x10Hosting Member purpler is an unknown quantity at this point
    Join Date
    Mar 2010
    Posts
    13

    Re: Best way to compress the HTTP?

    thanks for your suggestions but if you read the entire post i wrote you'd see that i already tried that method and that it doesn't worked.
    Anyways, i found the way to compress the traffic without using .htaccess.
    Thanks for good will anyways!

  5. #5
    b3n199 is offline x10Hosting Member b3n199 is an unknown quantity at this point
    Join Date
    Nov 2010
    Posts
    20

    Re: Best way to compress the HTTP?

    could you share how to compress site without rewrite .htaccess file?

+ Reply to Thread

Similar Threads

  1. Replies: 3
    Last Post: 06-15-2009, 07:42 AM
  2. http://ns1.x10hosting.com/ redirects to http://paperworksco.com/
    By kynam in forum Feedback and Suggestions
    Replies: 2
    Last Post: 01-16-2008, 01:53 PM
  3. Compress your html code!
    By kaixi in forum Scripts & 3rd Party Apps
    Replies: 7
    Last Post: 09-07-2007, 07:53 AM

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