> For the complete documentation index, see [llms.txt](https://docs.airdev.co/applications-platform-template-reference/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.airdev.co/applications-platform-template-reference/assets/pages/home.md).

# index

Landing page that redirects the user to their appropriate starting place

## Redirect Page Overview

The purpose of this page is just to redirect the user to whatever page they need to be going to. The reason why it's blank (instead of using a page like [home](/applications-platform-template-reference/assets/pages/home-page.md)) is that a blank page ensures a faster redirect, so users don't see a flash of content before they are redirected.

## Key Workflows

There are three redirect rules on the index page:

![Redirect rules](https://1504701494-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdukpFHinhBRguGr-7T%2F-Ldv0OTHjRLFUYw5rVQX%2F-Ldv0QIfq1b2Qcwm0XX9%2Fscreen-shot-2019-03-11-at-3.07.10-pm.png?generation=1556842142107046\&alt=media)

1. When `User is logged` in *\_AND* `Current user's Owner? is "no"` *OR* `Get stay from page url is "yes"` ***->** Go to page* `home` *and add url parameter* `stay=yes`\_
   * This means that if a user is a non Owner or if they are redirected to this page from a different page in the app (by clicking on the logo), they should be taken to the homepage
2. When `user is logged in` \_\_and `Current user's Owner? is "yes"` and `Get stay from page url is empty` **->** Go to page `owner`
   * This means that if the user is an Owner user and they're not intending to visit the homepage they should be taken to the Owner's Portal
3. When `user is logged out` **->** Go to page `home`
   * This means that logged out users should be taken to the homepage

{% hint style="info" %}
You should add any additional redirect rules to this index page since every user who is logged in will be taken to it first before being redirected to another page
{% endhint %}

On other pages (like [home](/applications-platform-template-reference/assets/pages/home-page.md) and [login](/applications-platform-template-reference/assets/pages/login-pages.md)) the app will redirect the user to the `index` page whenever they log-in, so that they can be redirected to an appropriate page afterwards. Think of this page as a traffic cop - when your users log in or log out, they pass through it to be directed to the right page.
