Redirect Crowd Server Setup Page to Crowd WebApp Login Page

Still need help?

The Atlassian Community is here for you.

Ask the community

Purpose

If you need to redirect users accidently going to Crowd Server Setup page (accessed through this URL <http://crowd-hostname:port>) instead of Crowd WebApp Login page (accessed through this URL <http://crowd-hostname:port/crowd>), below are the steps to do it.

Solution

  • Stop Crowd
  • Copy urlrewritefilter-4.0.3.jar FROM <crowd-install>/crowd-webapp/WEB-INF/lib/ TO <crowd-install>/apache-tomcat/lib/

  • Copy urlrewrite.xml FROM <crowd-install>/crowd-webapp/WEB-INF/ TO <crowd-install>/apache-tomcat/webapps/ROOT/WEB-INF
  • Update the file to contain only the following rule within the <urlrewrite> tag (you may need to comment out/delete a <class-rule> tag)
urlrewrite.xml
<urlrewrite>
    <rule enabled="true">
        <from>/</from>
        <to type="permanent-redirect">/crowd/</to>
    </rule>
</urlrewrite>


  • Modify web.xml found in <crowd-install>/apache-tomcat/webapps/ROOT/WEB-INF/ and add the following lines in <web-app> section. 


web.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>
    <display-name>IDX - Introduction Website</display-name>

    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
    </welcome-file-list>

    <filter>
        <filter-name>url-rewrite</filter-name>
        <filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
    </filter>

    <filter-mapping>
        <filter-name>url-rewrite</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

</web-app>
  • Start Crowd

Crowd Server Setup Page will automatically redirect the request to /crowd 

tip/resting Created with Sketch.

To avoid browser caching, either test this using Incognito Mode/Private Browsing or clear your browser cache.

Last modified on Apr 29, 2019

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.