# Subdomain vs Folder?

**URL:** <https://forum.mautic.org/t/subdomain-vs-folder/7683>\
**Category:** Product Support\
**Created:** [February 24, 2017, 10:04pm UTC](https://forum.mautic.org/t/subdomain-vs-folder/7683 "2017-02-24T22:04:13Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dez](https://avatars.discourse-cdn.com/v4/letter/d/ac8455/32.png) [@Dez](https://forum.mautic.org/u/Dez)\
**Post date:** [February 24, 2017, 10:04pm UTC](https://forum.mautic.org/t/subdomain-vs-folder/7683/1 "2017-02-24T22:04:13Z")

</div>

I’ve installed mautic in a sub-folder called “/mautic” and discovered that all the links in my emails are not redirecting. They have the URL:  
  
  
  
e.g.  
  
  
  
[site.com/r/dfvanojkefawe89fg394hfnrf](http://site.com/r/dfvanojkefawe89fg394hfnrf) - which goes to a 404 (the long string of character I just made up to give an example URL)  
  
  
  
When I amend the URL to [site.com/](http://site.com/) **mautic/** r/dfvanojkefawe89fg394hfnrf - which goes to a 404 it redirect fine.  
  
  
  
Is there a way to fix this in Mautic? I did make a mistake when installing by putting Site URL as  
  
  
  
[site.com/mautic](http://site.com/mautic)  
  
  
  
and changed it to just:  
  
  
  
[site.com](http://site.com)  
  
  
  
Could that be the issue?  
  
I also read on another post about “rewrite rules” but have no idea what these are?  
  
  
  
I don’t get this issue on another set up which is on it’s own sub-domain, but really don’t want to move the installation to its own sub-domain to get this to work.  
  
  
  
Any suggestions to fix?

---

<div class="post-metadata">

**Author:** ![Dez](https://avatars.discourse-cdn.com/v4/letter/d/ac8455/32.png) [@Dez](https://forum.mautic.org/u/Dez)\
**Post date:** [February 24, 2017, 10:04pm UTC](https://forum.mautic.org/t/subdomain-vs-folder/7683/2 "2017-02-24T22:04:13Z")

</div>

I’ve installed mautic in a sub-folder called “/mautic” and discovered that all the links in my emails are not redirecting. They have the URL:

e.g.

[site.com/r/dfvanojkefawe89fg394hfnrf](http://site.com/r/dfvanojkefawe89fg394hfnrf) - which goes to a 404 (the long string of character I just made up to give an example URL)

When I amend the URL to [site.com/](http://site.com/)mautic/r/dfvanojkefawe89fg394hfnrf - which goes to a 404 it redirect fine.

Is there a way to fix this in Mautic? I did make a mistake when installing by putting Site URL as

[site.com/mautic](http://site.com/mautic)

and changed it to just:

[site.com](http://site.com)

Could that be the issue?  
I also read on another post about “rewrite rules” but have no idea what these are?

I don’t get this issue on another set up which is on it’s own sub-domain, but really don’t want to move the installation to its own sub-domain to get this to work.

Any suggestions to fix?

---

<div class="post-metadata">

**Author:** ![Alcides](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@Alcides](https://forum.mautic.org/u/Alcides)\
**Post date:** [February 25, 2017, 2:18am UTC](https://forum.mautic.org/t/subdomain-vs-folder/7683/3 "2017-02-25T02:18:03Z")

</div>

I am in face of the same issue.  
My install is in a subfolder as well.  
It was working perfectly fine until I dicided to apply the lastest updates, wich takes me to the, version 2.6 and version 2.61 afterwards.

If I go to configuration setup, general setings, and set Site URL as it is: “[https://mysite.com/mautic/](https://mysite.com/mautic/)” the gravatar, themes images, landing pages edition does NOT work fine, it duplicates the installation folders on urls to show images as for example, such as "[https://mysite.com/mautic/mautic/](https://mysite.com/mautic/mautic/)… and emails assets links works fine.

BUT

If I go to configuration setup, general setings, and set Site URL as: “[https://mysite.com](https://mysite.com)” the gravatar, themes images, landing pages edition DOES work fine, it do NOT duplicate the installation folders on urls to show images as for example, such as "[https://mysite.com/mautic/](https://mysite.com/mautic/)… and emails assets links do NOT works fine, because they miss the /mautic/ folder.

I am struggling on find a solution.  
I can not believe mautic can not work properly on a folder install.

Please anyone with more deep knowledge, could you please help us?

---

<div class="post-metadata">

**Author:** ![olafdammann](https://avatars.discourse-cdn.com/v4/letter/o/779978/32.png) [@olafdammann](https://forum.mautic.org/u/olafdammann)\
**Post date:** [February 26, 2017, 5:37am UTC](https://forum.mautic.org/t/subdomain-vs-folder/7683/4 "2017-02-26T05:37:37Z")

</div>

> [@20576:@MxyzptlkFishStix](#):
>
> However, folder installs never work quite right.

Öööööhhhm… What does THAT mean? Is this a knows thing? Never heard, never read.

You reccom to run Mautic in “[mydomain.de](http://mydomain.de)” rather than “[mydomain.de/mautic](http://mydomain.de/mautic)”?  
OLAF

---

<div class="post-metadata">

**Author:** ![Alcides](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@Alcides](https://forum.mautic.org/u/Alcides)\
**Post date:** [February 27, 2017, 12:46am UTC](https://forum.mautic.org/t/subdomain-vs-folder/7683/5 "2017-02-27T00:46:29Z")

</div>

Hello!

Looks like we have a bug identified.

O Have been reading deveral theads on this fórum and for me It is a clear bug. Se can not remove the folder from the site URL and we Also can not keep It. It happened Since the last big update.  
Does anybody with more experience can please report this bug out?

---

<div class="post-metadata">

**Author:** ![Alcides](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@Alcides](https://forum.mautic.org/u/Alcides)\
**Post date:** [February 27, 2017, 1:50am UTC](https://forum.mautic.org/t/subdomain-vs-folder/7683/6 "2017-02-27T01:50:15Z")

</div>

> [@20576:@MxyzptlkFishStix](#):
>
> I could see you have more experience tem us. Could you please help us in reportinfg this bug out?

---

<div class="post-metadata">

**Author:** ![Alcides](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@Alcides](https://forum.mautic.org/u/Alcides)\
**Post date:** [February 27, 2017, 12:39pm UTC](https://forum.mautic.org/t/subdomain-vs-folder/7683/7 "2017-02-27T12:39:37Z")

</div>

> [@20634:@MxyzptlkFishStix](#):
>
> Thanks for the answer and help.  
> Yes! I did it! Clearing the cache was my first try. I did it manually deleting the /app/cache folder.

I also had followed the processes described a the link bellow becouse I thought it was related to a non-well-finished update.

> **[Uh Oh, Mautic upgrade was not successful | John Linhart](https://johnlinhart.com/blog/uh-oh-mautic-upgrade-was-not-successful)**
>
> My thoughts and other stuff.

Now I am 100% sure it was not the case.

Another test I have done was to replace all the mautic files from files from the last zip version, and the problem stays the same.

It was everything working fine with the version 2.5.1, but when I updated it to 2.6.0 and to 2.6.1 the problem appears.

Thanks in advanced for your help.

---

<div class="post-metadata">

**Author:** ![Dez](https://avatars.discourse-cdn.com/v4/letter/d/ac8455/32.png) [@Dez](https://forum.mautic.org/u/Dez)\
**Post date:** [March 3, 2017, 4:59pm UTC](https://forum.mautic.org/t/subdomain-vs-folder/7683/8 "2017-03-03T16:59:09Z")

</div>

I ended up moving everything to a sub-folder and it works fine now (v 2.6.1). Had to remember to update:

- Tracking Pixel
- Cron Jobs
- Plus any folder references in the Configuration menus

---

<div class="post-metadata">

**Author:** ![Alcides](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@Alcides](https://forum.mautic.org/u/Alcides)\
**Post date:** [March 5, 2017, 3:48pm UTC](https://forum.mautic.org/t/subdomain-vs-folder/7683/9 "2017-03-05T15:48:52Z")

</div>

[quote=20847:@Dez]I ended up moving everything to a sub-folder and it works fine now (v 2.6.1). Had to remember to update:

- Tracking Pixel
- Cron Jobs
- Plus any folder references in the Configuration menus[/quote]

Thanks for your answer.

In my case, I have a wordpress installation in the root domain and mautic installed in a folder.  
It does NOT worked for me.

Could you please share how have you setuped your virtualhost on apache?  
did you setup the mautic folder as an alias ir simply instalo It on a folder directly?

Could you please Just discribed a little bit more about your setup?  
Thanks in advanced.
