Index: src/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotatorRestlet.java
===================================================================
--- src/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotatorRestlet.java	(revision 91)
+++ src/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotatorRestlet.java	(revision 94)
@@ -30,4 +30,6 @@
 import org.restlet.routing.Router;
 
+import de.mpiwg.itgroup.annotations.restlet.utils.UrlPrefixFilter;
+
 /**
  * @author casties
@@ -46,4 +48,5 @@
     public Restlet createInboundRoot() {
 
+    	Restlet root = null;
         Router router = new Router(getContext());
         
@@ -59,9 +62,16 @@
         router.attach("/resources/{id}/annotations", AnnotatorAnnotationsByResources.class);
         router.attach("/", AnnotatorInfo.class);
-        //return router;
+        root = router;
 
         // this.authenticator = createAuthenticator();
         // authenticator.setNext(router);
-        // return authenticator;
+        
+        if (this.webappUriPrefix != null) {
+	        // add prefix path to url
+	        UrlPrefixFilter prefixFilter = new UrlPrefixFilter();
+	        prefixFilter.setPrefix(this.webappUriPrefix);;
+	        prefixFilter.setNext(root);
+	        root = prefixFilter;
+        }
 
         // handle Cross-Origin-Resource-Security headers
@@ -69,6 +79,8 @@
         corsFilter.setAllowedOrigins(new HashSet<String>(Arrays.asList("*")));
         corsFilter.setAllowedCredentials(true);
-        corsFilter.setNext(router);
-        return corsFilter;
+        corsFilter.setNext(root);
+        root = corsFilter;
+
+        return root;
 
     }
Index: src/main/java/de/mpiwg/itgroup/annotations/restlet/BaseRestlet.java
===================================================================
--- src/main/java/de/mpiwg/itgroup/annotations/restlet/BaseRestlet.java	(revision 89)
+++ src/main/java/de/mpiwg/itgroup/annotations/restlet/BaseRestlet.java	(revision 94)
@@ -115,4 +115,10 @@
     
     /**
+     * prefix for webapp URLs (if needed by proxying).
+     */
+    protected String webappUriPrefix = null;
+    public static final String WEBAPP_PREFIX = "annotationmanager.webapp.prefix";
+    
+    /**
      * prefix to create uris for tags in store.
      */
@@ -172,4 +178,5 @@
                         graphdbPath = serverConfig.getProperty(GRAPHDB_PATH_KEY, graphdbPath);
                         ldapServerUrl = serverConfig.getProperty(LDAP_SERVER_KEY, null);
+                        webappUriPrefix = serverConfig.getProperty(WEBAPP_PREFIX, null);
                         /*
                          * uri prefixes
Index: src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/AnnotationResource.java
===================================================================
--- src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/AnnotationResource.java	(revision 93)
+++ src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/AnnotationResource.java	(revision 78)
@@ -123,5 +123,5 @@
             // output person content
             result = "<html><body>\n<h1>Annotation</h1>\n";
-            result += "<p><a href=\"./\">All annotations</a></p>";
+            result += String.format("<p><a href=\"%s\">All annotations</a></p>", this.getReference().getParentRef());
             result += "<table>";
             result += String.format("<tr><td><b>uri</b></td><td>%s</td></tr>\n", annotation.getUri());
@@ -142,5 +142,7 @@
             //result += "<p><a href=\"?form=edit\">Edit annotation</a></p>\n";
             // tunnel POST as DELETE
-            result += "<form method=\"post\" action=\"?method=DELETE\"><input type=\"submit\" value=\"Delete annotation\"/></form>\n";
+            result += String.format(
+                    "<form method=\"post\" action=\"%s?method=DELETE\"><input type=\"submit\" value=\"Delete annotation\"/></form>\n",
+                    this.getReference().getHierarchicalPart());
             result += "</body>\n</html>";
         }
Index: src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/AnnotationsResource.java
===================================================================
--- src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/AnnotationsResource.java	(revision 93)
+++ src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/AnnotationsResource.java	(revision 94)
@@ -49,5 +49,5 @@
 public class AnnotationsResource extends ServerResource {
 
-    public static Logger logger = Logger.getLogger("de.mpiwg.itgroup.annotations.restlet.annotations_ui.AnnotationsResource");
+    public static Logger logger = Logger.getLogger(AnnotationsResource.class.getCanonicalName());
 
     private AnnotationStore store;
@@ -76,5 +76,6 @@
         List<Annotation> annotations = store.getAnnotations("id", "*");
         for (Annotation annotation : annotations) {
-            String url = annotation.getUrlId();
+            Reference url = this.getReference().clone();
+            url.addSegment(annotation.getUrlId());
             result += String.format("<tr><td><a href=\"%s\">%s</a></td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>\n", url,
                     annotation.getUri(), annotation.getBodyText(), annotation.getTargetBaseUri(), annotation.getTargetFragment(),
Index: src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/AnnotationsUiRestlet.java
===================================================================
--- src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/AnnotationsUiRestlet.java	(revision 93)
+++ src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/AnnotationsUiRestlet.java	(revision 94)
@@ -1,2 +1,5 @@
+/**
+ * 
+ */
 package de.mpiwg.itgroup.annotations.restlet.annotations_ui;
 
@@ -32,4 +35,5 @@
 
 import de.mpiwg.itgroup.annotations.restlet.BaseRestlet;
+import de.mpiwg.itgroup.annotations.restlet.utils.UrlPrefixFilter;
 
 /**
@@ -39,5 +43,5 @@
 public class AnnotationsUiRestlet extends BaseRestlet {
 
-    public final String version = "AnnotationManagerN4J/AnnotationsUI 0.4";
+    public final String version = "AnnotationManagerN4J/AnnotationsUI 0.3";
 
     public static Logger logger = Logger.getLogger("de.mpiwg.itgroup.annotations.restlet.annotations_ui.AnnotationsUiRestlet");
@@ -51,7 +55,7 @@
     public Restlet createInboundRoot() {
         // this.authenticator = createAuthenticator();
-
+    	Restlet root = null;
+    	
         Router router = new Router(getContext());
-
         router.attach("/groups", GroupsResource.class);
         router.attach("/groups/", GroupsResource.class);
@@ -67,6 +71,14 @@
         router.attach("/annotations/{id}", AnnotationResource.class);
         router.attach("/annotations/{id}/", AnnotationResource.class);
-
         router.attach("/", InfoResource.class);
+        root = router;
+        
+        if (this.webappUriPrefix != null) {
+	        // add prefix path to url
+	        UrlPrefixFilter prefixFilter = new UrlPrefixFilter();
+	        prefixFilter.setPrefix(this.webappUriPrefix);;
+	        prefixFilter.setNext(root);
+	        root = prefixFilter;
+        }
 
         // use simple password verifier
@@ -81,9 +93,11 @@
         }
         // Create a Guard
-        ChallengeAuthenticator guard = new ChallengeAuthenticator(getContext(), ChallengeScheme.HTTP_BASIC, "Annotation Server");
+        ChallengeAuthenticator guard = new ChallengeAuthenticator(getContext(), ChallengeScheme.HTTP_BASIC, "Tutorial");
         guard.setVerifier(verifier);
         // put everything through guard
-        guard.setNext(router);
-        return guard;
+        guard.setNext(root);
+        root = guard;
+        
+        return root;
     }
 
Index: src/main/java/de/mpiwg/itgroup/annotations/restlet/utils/UrlPrefixFilter.java
===================================================================
--- src/main/java/de/mpiwg/itgroup/annotations/restlet/utils/UrlPrefixFilter.java	(revision 94)
+++ src/main/java/de/mpiwg/itgroup/annotations/restlet/utils/UrlPrefixFilter.java	(revision 94)
@@ -0,0 +1,67 @@
+package de.mpiwg.itgroup.annotations.restlet.utils;
+
+/*
+ * #%L
+ * AnnotationManager
+ * %%
+ * Copyright (C) 2012 - 2015 MPIWG Berlin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as 
+ * published by the Free Software Foundation, either version 3 of the 
+ * License, or (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Lesser Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Lesser Public 
+ * License along with this program.  If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import org.restlet.Request;
+import org.restlet.Response;
+import org.restlet.data.Reference;
+import org.restlet.routing.Filter;
+
+/**
+ * Filter that adds a prefix path to all internally generated URLs.
+ * 
+ * @author casties
+ *
+ */
+public class UrlPrefixFilter extends Filter {
+
+	private String prefix = null;
+	
+	/**
+	 * Set the prefix to add.
+	 * 
+	 * @param prefix
+	 */
+	public void setPrefix(String prefix) {
+		if (!prefix.startsWith("/")) {
+			prefix = "/" + prefix;
+		}
+		this.prefix = prefix;
+	}
+	
+	@Override
+	protected int beforeHandle(Request request, Response response) {
+		// get ref to change
+	    Reference ref = request.getResourceRef();
+	    String path = ref.getPath();
+	    // add prefix to path
+	    ref.setPath(prefix + path);
+	    // change baseRef as well
+	    Reference baseRef = ref.getBaseRef();
+	    String basePath = baseRef.getPath();
+	    // add prefix to base ref path
+	    baseRef.setPath(prefix + basePath);
+		return super.beforeHandle(request, response);
+	}
+
+}
Index: src/main/webapp/WEB-INF/serverconfig.property.template
===================================================================
--- src/main/webapp/WEB-INF/serverconfig.property.template	(revision 59)
+++ src/main/webapp/WEB-INF/serverconfig.property.template	(revision 94)
@@ -10,2 +10,3 @@
 annotationmanager.uris.groups = http://entities.mpiwg-berlin.mpg.de/groups/
 annotationmanager.uris.annotations = http://entities.mpiwg-berlin.mpg.de/annotations/
+#annotationmanager.webapp.prefix = /annotations
Index: src/main/webapp/index.html
===================================================================
--- src/main/webapp/index.html	(revision 93)
+++ src/main/webapp/index.html	(revision 54)
@@ -25,7 +25,7 @@
   <h2>Admin</h2>
   <ul>
-    <li><a href="annotations/groups/">View and edit groups</a></li>
-    <li><a href="annotations/persons/">View and edit persons</a></li>
-    <li><a href="annotations/annotations/">View and edit annotations</a></li>
+    <li><a href="annotations/groups">View and edit groups</a></li>
+    <li><a href="annotations/persons">View and edit persons</a></li>
+    <li><a href="annotations/annotations">View and edit annotations</a></li>
   </ul>
 </body>
