Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] 301 redirect of index.html


I've would like to make a permanent (301) redirect of to I've tried using
MovedContextHandler but I only get 302 redirect's even tho I set the
permanent flagg to true.

I've also tried using a servlet using catching the pattern "/index.html"

resp.setHeader("location" , "";);

but this will of course render i a infinite loop.

On a Apache server I would put something like this in a .htacces file
Options +FollowSymLinks
RewriteCond %{THE_REQUEST} ^.*/index.html
RewriteRule ^(.*)index.html$$1 [R=301,L]

My question is how can I solve this issue with jetty?

Kind regards
Kjell Tillstrand

Back to the top