How can I enable GZIP compression in Jetty?
40
You have to enable the GzipFilter
to make Jetty return compressed content. Have a look here on how to do that: http://blog.max.berger.name/2010/01/jetty-7-gzip-filter.html
You can also use the gzip
init parameter to make Jetty search for compressed content. That means if the file file.txt
is requested, Jetty will watch for a file named file.txt.gz
and returns that.
Related videos on Youtube
Author by
azarudeen
Updated on September 18, 2022Comments
-
azarudeen almost 2 years
i need to redirect my old url to new url structure
old is http://website.com/mp3/song-name/
new is http://website.com/song-name-mp3-download.html
How can I do this using mod_rewrite?
<IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^play/(\d+)/.*$ playlist.php?action=shareview&id=$1 RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ search.php?search=$1 [L] RewriteRule 404.html 404.php RewriteEngine on RewriteCond $1 [A-Z] RewriteRule ^/?(.*)$ /${lowercase:$1} [R=301,L] <IfModule mod_deflate.c> <FilesMatch "\.(php|js|css|mp3|wmv|flv|html|htm)$"> SetOutputFilter DEFLATE </FilesMatch> </IfModule> ErrorDocument 404 /mp3/404.html </IfModule>
-
tamberg almost 10 years
-
anubhava over 9 yearsAre there more rules in this .htaccess? What URL did you try?
-
azarudeen over 9 yearsthis is my current file
-
anubhava over 9 yearsAh not in comments (it is unreadable), please edit your question and provide it there.
-
anubhava over 9 yearsok in your htaccess insert this rule just below
RewriteEngine on
line. -
azarudeen over 9 yearsLet us continue this discussion in chat.
-
azarudeen over 9 yearscan you please suggest how to convert uppercase to lowercase in httpd.conf file
-
azarudeen over 9 yearsis there any option without using htaccess
-
anubhava over 9 yearsYou can do this in PHP also.
-
anubhava over 9 yearsYes
lowercase
needs to be defined usingRewriteMap
. Also please don't change the question at this stage. If you run into problems don't hesitate to open a new question. -
azarudeen over 9 yearsLet us continue this discussion in chat.
-
Janaka Bandara over 6 yearsThe XML configuration could be added to
WEB-INF/jetty-env.xml
of the webapp (there are other options as well,jetty-web.xml
,web-jetty.xml
,classes/org/eclipse/jetty/webapp/webdefault.xml
,...)