subpage as start page?

This is an open forum for any mojoPortal topics that don't fall into the other categories.

This thread is closed to new posts. You must sign in to post in the forums.
10/5/2009 4:26:20 AM
Gravatar
Total Posts 220

subpage as start page?

Hi,

is it possible to start the site with a subpage?

Matthias

10/5/2009 7:16:45 AM
Gravatar
Total Posts 18439

Re: subpage as start page?

Hi Matthias,

The only way I know of to do that is to use a redirect.

In IIS you configure default documents, so we already have one for Default.aspx to be a default document, but you can add another one for index.aspx and make it a higher priority default.

Then create a text file in the root named index.aspx and paste in this code, changing the redirect url to point to your sub page.

<%@ Page Language="C#" ClassName="CustomPage.aspx" Inherits="System.Web.UI.Page" %>

<script runat="server">

protected void Page_Load(object sender, EventArgs e)

{

Response.Redirect("ulrtoyoursubpage.aspx");

}

 

</script>

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

<html xmlns="http://www.w3.org/1999/xhtml" >

<head id="Head1" runat="server">

<title>CustomPage</title>

</head>

<body>

<form id="form1" runat="server">

 

</form>

</body>

</html>

Hope it helps,

Joe

10/5/2009 8:12:32 AM
Gravatar
Total Posts 220

Re: subpage as start page?

Hi Joe,

thanks! That works fine Smile.

Matthias

You must sign in to post in the forums. This thread is closed to new posts.