Difference between revisions of "SES Urls"

From Hostek.com Wiki
Jump to: navigation, search
(Search Engine Safe URLS and how to achieve them in special hosting centric environments.)
 
(With Railo)
Line 4: Line 4:
 
'''Q: I want to add a servelet mapping to Railo, example /A_B/index.cfm/* is this possible?'''
 
'''Q: I want to add a servelet mapping to Railo, example /A_B/index.cfm/* is this possible?'''
  
A: Yes, you can add a servelet mapping directly to the /WEB-INF/web.xml file in your domains public root directory. See the proper formatting below; a restart of Railo/Tomcat is NOT needed, this change should take place right away.
+
'''A''': Yes, you can add a servlet mapping directly to the /WEB-INF/web.xml file in your domains public root directory. See the proper formatting below; a restart of Railo/Tomcat is NOT needed, this change should take place right away.
 
+
 
<pre>
 
<pre>
 
   <servlet-mapping>
 
   <servlet-mapping>
Line 11: Line 10:
 
     <url-pattern>/1_0/index.cfm/*</url-pattern>
 
     <url-pattern>/1_0/index.cfm/*</url-pattern>
 
   </servlet-mapping>
 
   </servlet-mapping>
 +
</pre>
 +
 +
Also, if you use Mura and wish to leave the site name in the URL, you'll have to add a custom servlet mapping too. In this case, the site name is "default", and the mapping would look like this:
 +
<pre>
 +
<servlet-mapping>
 +
    <servlet-name>GlobalCFMLServlet</servlet-name>
 +
    <url-pattern>/default/index.cfm/*</url-pattern>
 +
</servlet-mapping>
 
</pre>
 
</pre>

Revision as of 19:49, 1 December 2012

With Railo

Q: I want to add a servelet mapping to Railo, example /A_B/index.cfm/* is this possible?

A: Yes, you can add a servlet mapping directly to the /WEB-INF/web.xml file in your domains public root directory. See the proper formatting below; a restart of Railo/Tomcat is NOT needed, this change should take place right away.

  <servlet-mapping>
    <servlet-name>GlobalCFMLServlet</servlet-name>
    <url-pattern>/1_0/index.cfm/*</url-pattern>
  </servlet-mapping>

Also, if you use Mura and wish to leave the site name in the URL, you'll have to add a custom servlet mapping too. In this case, the site name is "default", and the mapping would look like this:

<servlet-mapping>
    <servlet-name>GlobalCFMLServlet</servlet-name>
    <url-pattern>/default/index.cfm/*</url-pattern>
</servlet-mapping>