Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

WSS3: How to redirect to alternative homepage other than default.aspx in content database?

  Asked By: Angelique    Date: Jan 26    Category: Sharepoint    Views: 3504

I have WSS3 installed. Form Authentication implemented. What I am trying to do now is that I would like to wss3 to redirect users to another page other than default.aspx which is stored in content database.

Currently, when I type the http://srv, it shows http://srv/_layouts/mylogin/login.aspx?ReturnUrl=%2f, and after login, I will be in the http://srv/default.aspx page.

If I take ?ReturnUrl=%2f away from the url, use the url http://srv/_layouts/mylogin/login.aspx, I will be redirected to page http://srv/_layouts/my/default.aspx.

Does anyone know some solution to this problem?



1 Answer Found

Answer #1    Answered By: Bailey Lewis     Answered On: Jan 26

You can add a content  editor webpart onto your default.aspx and add

<script language="javascript">
window.location.href = "[your desired URL]";

But then, your default.aspx will not be accessible at all, because everytime you hit it, you will be redirected. If it’s not the desired functionality then I would recommend adding a cookie to the user’s browser before redirecting. And every time the default.aspx is hit again, first check for a cookie (it will be an indicator if users  have already been on the page). If cookie exists, do not redirect, otherwise set the cookie and redirect.