%
String rAlias,rUrl,baseHref;
rAlias = rUrl = "";
baseHref = rz.baseurl();
baseHref = baseHref
.replaceAll("/index.php","")
.replaceAll("http://","")
.replaceAll("https://","")
.replaceAll("www.","")
.replaceAll("/redirect_new.php","")
.replaceAll("/redirect.php","");
%>
Directions: This page is for making friendly URL's which are also known as redirects. You will need to come up with a Friendly URL that you want your residents to use. For example: Instead of going to www.site.com/departments/meetings/page.php you could just choose page. Then visitors could simply go to www.site.com/page and it will redirect to that page.
<%
while(rz.listnext() && rz.listindex > -1){%>
<%-- Fetch: Alias --%>
<%
rAlias = rz.content;%>
<%-- Fetch: Redirect URL --%>
<%
rUrl = rz.content;
rUrl = rUrl.indexOf(baseHref) >= 0
? "..." + rUrl.substring(rUrl.indexOf(baseHref) + baseHref.length())
: rUrl.replaceAll("/index.php","").replaceAll("http://","").replaceAll("https://","").replaceAll("www.","");%>
Friendly URL:
<%=rAlias%>
URL:
<%=rUrl%>
<%
}%>