url - Java web app: prevent a slash from being added to the path? -
if run webapp under uri /myapp
app accessed via http://example.com/myapp
, url changes http://example.com/myapp/
. there way prevent this?
when have such behaviour web (or application) server returns a
301 moved permanently
when url without slash requested.
you can see similar example when getting http://www.google.es/services
http/1.1 301 moved permanently location: http://www.google.es/services/ content-type: text/html; charset=utf-8 x-content-type-options: nosniff date: wed, 11 may 2011 15:24:06 gmt expires: fri, 10 jun 2011 15:24:06 gmt cache-control: public, max-age=2592000 server: sffe content-length: 227 x-xss-protection: 1; mode=block
after first http http://www.google.es/services (without slash), browser makes second http http://www.google.es/services/ (with slash). can trace http requests network tab in firebug, example.
you can check web/application server configuration, , maybe can change behaviour.
Comments
Post a Comment