<p>I found it, needed to change the SiteURL in .env file.</p>

CC BY-SA 4.0
2019-07-20T15:28:05.943Z
2019-07-20T15:28:05.943Z
JTR
<p>I've moved my Craft directory to the below:</p>

<pre><code>Templates
Public_Html
Web
etc..
etc..
</code></pre>

<p>My previous directory when I installed was:</p>

<pre><code>Public_html &gt; Craft-setup &gt; Web &gt; Templates
</code></pre>

<p>Now when I login from the front-end as a user, I get taken to the old directory even though it's empty,</p>

<pre><code>example.com/craft-setup/web/
</code></pre>

<p>The actual directory it should be taking me to is</p>

<pre><code>example.com/
</code></pre>

<p>As my index.php craft file is in public_html</p>

<p>What is the correct method to update the redirect to go to the correct place?</p>

<p>I can access my site perfectly fine and use it by going to example.com/ i'm assuming my base path is fine as the site loads and functions by going to the domain, so why is the front-end login taking me to the old directory? this is the login form I'm talking about <a href="https://docs.craftcms.com/v3/dev/examples/login-form.html" rel="nofollow noreferrer">https://docs.craftcms.com/v3/dev/examples/login-form.html</a> </p>

<p>Appreciate any help</p>

<redirect><login>
Craft login redirecting to /web instead of /templates?
# Craft login redirecting to /web instead of /templates?

(Asked by: username_0 on 2019-07-20)

I've moved my Craft directory to the below:
Templates
Public_Html
Web
etc..
etc..

My previous directory when I installed was:
Public_html > Craft-setup > Web > Templates

Now when I login from the front-end as a user, I get taken to the old directory even though it's empty,
example.com/craft-setup/web/

The actual directory it should be taking me to is
example.com/

As my index.php craft file is in public_html
What is the correct method to update the redirect to go to the correct place?
I can access my site perfectly fine and use it by going to example.com/ i'm assuming my base path is fine as the site loads and functions by going to the domain, so why is the front-end login taking me to the old directory? this is the login form I'm talking about https://docs.craftcms.com/v3/dev/examples/login-form.html 
Appreciate any help

**Tags:** redirect, login

---

## 1 answers

### Answer by username_0 on 2019-07-20. Score: 1

I found it, needed to change the SiteURL in .env file.


---

