cancel
Showing results for 
Search instead for 
Did you mean: 

Redirection

zazugue
Champ in-the-making
Champ in-the-making
Hello guys ! I am on Alfresco Community 5.0d on Windows.

I am trying to redirect the URL "mycompany.com:8080/" to "mycompany.com:8080/share/page". So i saw a possibility to to it with Urlrewritefilter install inside of Alfresco "C:\Alfresco\tomcat\webapps\wcmqs\WEB-INF" but the problem it doesn't work.

My question is, it's possible to do it with UrlRewriteFilter or there are another way to do it?

Thank you for your support.
5 REPLIES 5

angelborroy
Community Manager Community Manager
Community Manager
I'd include a redirection in Tomcat home page, like this one: https://notesbytom.wordpress.com/2013/03/21/redirect-apache-tomcat-default-page/
Hyland Developer Evangelist

zazugue
Champ in-the-making
Champ in-the-making
Thank you ! I will try that ! So every redirections, we have to use the file index.jsp?

zazugue
Champ in-the-making
Champ in-the-making
Okay so, i add <% response.sendRedirect("/share/page"); %> in the file "index.jsp" inside the folder "tomcat\webapps\alfresco".

If i put "mycompany:8080/" it doesn't work but if i put "mycompany:8080/alfresco" the redirection works. But it's not really what i want. :s

This is because your index.jsp is part of the Alfresco webapp, so is only available under the context root "/alfresco" as far as Tomcat is concerned.  There are probably various ways you can do what you want but a couple of options are:
<ol>
<li> Change the index.jsp file of the default tomcat web app (called ROOT, so webapps/ROOT/index.jsp) and set it to be what you have above
<li> Changing the default wepapp tomcat uses by default is also possible, but messy: http://stackoverflow.com/questions/14325171/setting-default-application-in-tomcat-7
</ol>

I'm sure there are other ways as well e.g. using url rewrite in the ROOT webapp etc etc but they all work along the same lines of changing soemthing within the ROOT app, or adding a context file pretending to be ROOT.

Regards

Steven

Okay i see ! I tried and it works ! But quite weird by changing the name, the redirection understand it.

Thank you !