Jahia Dev Forum > is it possible to...

0 (0 Good)
0 (0 Bad)

is it possible to remove /cms from jahia urls

by  jmoumne »  2011/06/07 20:46

Hello,

Does anyone know if it is possible to remove /cms from jahia urls ?

We tried updating



<servlet-mapping>

    <servlet-name>Jahia</servlet-name>

    <url-pattern>/cms/*</url-pattern>

</servlet-mapping>

 

to

<servlet-mapping>

    <servlet-name>Jahia</servlet-name>

    <url-pattern>/*</url-pattern>

</servlet-mapping>

 

and

        <param-name>defaultJahiaServletPath</param-name>

        <param-value>/cms</param-value>

 

to

        <param-name>defaultJahiaServletPath</param-name>

        <param-value>/</param-value>

with no luck

accessing the root ('http://servername/') gives us :

User message=404 Not found - Page:null, System message=404 error - page [null] could not be found in the database or is no longer accessible.

  • is it possible to remove /cms from jahia urls
    2011/07/08 13:16

    jmoumne <p> Hello,<br /> <br /> Does anyone know if it is possible to remove /cms from jahia urls ?<br /> <br /> We tried updating</p> <br /> <br /> <p> <title></title> </p> <pre> &lt;servlet-mapping&gt; &lt;servlet-name&gt;Jahia&lt;/servlet-name&gt; &lt;url-pattern&gt;/cms/*&lt;/url-pattern&gt; &lt;/servlet-mapping&gt;</pre> <p> &nbsp;</p> <p> to</p> <pre> &lt;servlet-mapping&gt; &lt;servlet-name&gt;Jahia&lt;/servlet-name&gt; &lt;url-pattern&gt;/*&lt;/url-pattern&gt; &lt;/servlet-mapping&gt;</pre> <p> &nbsp;</p> <p> and</p> <pre> &lt;param-name&gt;defaultJahiaServletPath&lt;/param-name&gt; &lt;param-value&gt;/cms&lt;/param-value&gt;</pre> <p> &nbsp;</p> <p> to</p> <pre> &lt;param-name&gt;defaultJahiaServletPath&lt;/param-name&gt; &lt;param-value&gt;/&lt;/param-value&gt;</pre> <p> with no luck</p> <p> accessing the root (&#39;http://servername/&#39;) gives us :</p> <blockquote> <p> User message=404 Not found - Page:null, System message=404 error - page [null] could not be found in the database or is no longer accessible.</p> </blockquote>

  • Number of messages  3
    Registration date Jun 7, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: is it possible to remove /cms from jahia urls

    by  mesdocs »  2011/06/07 20:46

    Hello,

    You should also modify ROOT/WEB-INF/etc/struts/strust-config.xml where /cms is also referenced.

    Regards,

    Mesdocs.
  • Re: is it possible to remove /cms from jahia urls
    2011/06/07 20:46

    mesdocs Hello,<br/><br/>You should also modify ROOT/WEB-INF/etc/struts/strust-config.xml where /cms is also referenced.<br/><br/>Regards,<br/><br/>Mesdocs.

  • Number of messages  53
    Registration date Jun 7, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: is it possible to remove /cms from jahia urls

    by  shyrkov »  2011/06/07 20:46

    Hello,

    changing '/cms' into '/' won't work because all the requests will be targeted to Jahia servlet (if the servlet container will allow overriding Default servlet that is mapped to '/').

    In several cases, modifying the URLRewriteFilter configuration (urlrewrite.xml), can help, but this won't work 100% reliably, as there are a lot of other resources, that are served from different servlets (not from Jahia one) and also "static" resources and JSPs, that are served by Tomcat directly (default and jsp servlets in Tomcat).

    Nevertheless you can change the "/cms" to something more appropriate for your project, e.g. "/portal", "/content", etc.

    Kind regards
    Sergiy

  • Re: is it possible to remove /cms from jahia urls
    2011/07/08 13:17

    shyrkov <p> Hello,<br /> <br /> changing &#39;/cms&#39; into &#39;/&#39; won&#39;t work because all the requests will be targeted to Jahia servlet (if the servlet container will allow overriding Default servlet that is mapped to &#39;/&#39;).<br /> <br /> In several cases, modifying the URLRewriteFilter configuration (urlrewrite.xml), can help, but this won&#39;t work 100% reliably, as there are a lot of other resources, that are served from different servlets (not from Jahia one) and also &quot;static&quot; resources and JSPs, that are served by Tomcat directly (default and jsp servlets in Tomcat).<br /> <br /> Nevertheless you can change the &quot;/cms&quot; to something more appropriate for your project, e.g. &quot;/portal&quot;, &quot;/content&quot;, etc.<br /> <br /> Kind regards<br /> Sergiy</p>

  • Number of messages  407
    Registration date Jun 7, 2011
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page