<p>You can always set a path in the actual form as well.</p>

<p><code>&lt;input type="hidden" name="redirect" value="/some/url"&gt;</code></p>

<p>Just drop this field in the login form, assuming this is what you're using.</p>

<p><a href="https://craftcms.com/docs/templating/login-form" rel="nofollow noreferrer">https://craftcms.com/docs/templating/login-form</a></p>

CC BY-SA 3.0
2017-03-27T00:16:51.470Z
2017-03-27T00:16:51.470Z
Ryan Shrum
<p>Thanks guys. I solved it.
The issue was that I was logging in as the admin not an ordinary user.</p>

CC BY-SA 3.0
2017-03-27T18:57:06.327Z
2017-03-27T18:57:06.327Z
Alistair
<p>I am currently trying to make it so when I have logged in on my website as a user it redirects to a certain page.</p>

<p>However it is not working.</p>

<p>I have tried adding the following redirect in the configuration file however no luck: </p>

<pre><code>'postLoginRedirect' =&gt; 'profile/test'
</code></pre>

<p>Any tips or suggestions will be appreciated.</p>

CC BY-SA 3.0
2017-03-25T14:56:29.240Z
Do you want the redirect to happen after the user logs in via a front-end form, or via the `/admin/login` form? If it's the latter, you need to use `postCpLoginRedirect`.
Stephen Lewis
<redirect><login>
Login redirect is not working
# Login redirect is not working

(Asked by: username_0 on 2017-03-25)

I am currently trying to make it so when I have logged in on my website as a user it redirects to a certain page.
However it is not working.
I have tried adding the following redirect in the configuration file however no luck: 
'postLoginRedirect' => 'profile/test'

Any tips or suggestions will be appreciated.

**Tags:** redirect, login
> **Comments:**
> **username_1**: Do you want the redirect to happen after the user logs in via a front-end form, or via the `/admin/login` form? If it's the latter, you need to use `postCpLoginRedirect`.  

---

## 2 answers

### Answer by username_2 on 2017-03-27. Score: 1 | Accepted answer

You can always set a path in the actual form as well.

Just drop this field in the login form, assuming this is what you're using.

<https://craftcms.com/docs/templating/login-form>


---

### Answer by username_0 on 2017-03-27. Score: 2

Thanks guys. I solved it.
The issue was that I was logging in as the admin not an ordinary user.


---

