# Localhost issues with xampp

**URL:** <https://discourse.slimframework.com/t/localhost-issues-with-xampp/5543>\
**Category:** Questions\
**Created:** [March 3, 2023, 6:07am UTC](https://discourse.slimframework.com/t/localhost-issues-with-xampp/5543 "2023-03-03T06:07:01Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![n2fole00](https://avatars.discourse-cdn.com/v4/letter/n/e47774/32.png) [@n2fole00](https://discourse.slimframework.com/u/n2fole00)\
**Post date:** [March 3, 2023, 6:07am UTC](https://discourse.slimframework.com/t/localhost-issues-with-xampp/5543/1 "2023-03-03T06:07:01Z")

</div>

Hi, I cloned the slim-skeleton app and set

```auto
$app = AppFactory::create();
$app->setBasePath('/slim');

```

So I can run from localhost/slim. When connecting to [http://localhost/slim/](http://localhost/slim/) I currently get the message

```auto
{
    "statusCode": 405,
    "error": {
        "type": "NOT_ALLOWED",
        "description": "Method not allowed. Must be one of: OPTIONS"
    }
}

```

Here is my repository [https://github.com/enfrte/slim-skeleton](https://github.com/enfrte/slim-skeleton)

Apache config is has AllowOverride All in the DocumentRoot of the project.

Anyone know what I have set wrong?

Thanks.

---

<div class="post-metadata">

**Author:** ![odan](https://avatars.discourse-cdn.com/v4/letter/o/9de053/32.png) [@odan](https://discourse.slimframework.com/u/odan)\
**Post date:** [March 3, 2023, 8:49am UTC](https://discourse.slimframework.com/t/localhost-issues-with-xampp/5543/2 "2023-03-03T08:49:39Z")

</div>

Hi!

I would try to fix it as follows:

- Replace the two `.htaccess` files according to the docs as described [here](https://www.slimframework.com/docs/v4/start/web-servers.html#apache-configuration).  
Please just copy the two .htaccess exactly as they are documented. You don’t need to change it.

- Comment out the wildcard route in [routes.php](https://github.com/enfrte/slim-skeleton/blob/master/app/routes.php#L13-L16)

---

<div class="post-metadata">

**Author:** ![n2fole00](https://avatars.discourse-cdn.com/v4/letter/n/e47774/32.png) [@n2fole00](https://discourse.slimframework.com/u/n2fole00)\
**Post date:** [March 3, 2023, 2:30pm UTC](https://discourse.slimframework.com/t/localhost-issues-with-xampp/5543/3 "2023-03-03T14:30:03Z")

</div>

Thanks. I followed your recommendation and I’ve updated the repository. I now get the following…

```auto
{
    "statusCode": 404,
    "error": {
        "type": "RESOURCE_NOT_FOUND",
        "description": "Not found."
    }
}

```

---

<div class="post-metadata">

**Author:** ![odan](https://avatars.discourse-cdn.com/v4/letter/o/9de053/32.png) [@odan](https://discourse.slimframework.com/u/odan)\
**Post date:** [March 3, 2023, 2:49pm UTC](https://discourse.slimframework.com/t/localhost-issues-with-xampp/5543/4 "2023-03-03T14:49:30Z")

</div>

Because you have two different App instances:

- [slim-skeleton/index.php at master · enfrte/slim-skeleton · GitHub](https://github.com/enfrte/slim-skeleton/blob/master/public/index.php#L15)
- [slim-skeleton/index.php at master · enfrte/slim-skeleton · GitHub](https://github.com/enfrte/slim-skeleton/blob/master/public/index.php#L42)

---

<div class="post-metadata">

**Author:** ![n2fole00](https://avatars.discourse-cdn.com/v4/letter/n/e47774/32.png) [@n2fole00](https://discourse.slimframework.com/u/n2fole00)\
**Post date:** [March 3, 2023, 3:07pm UTC](https://discourse.slimframework.com/t/localhost-issues-with-xampp/5543/5 "2023-03-03T15:07:55Z")

</div>

Thanks, it’s changed and pushed, but still get the same error.

---

<div class="post-metadata">

**Author:** ![odan](https://avatars.discourse-cdn.com/v4/letter/o/9de053/32.png) [@odan](https://discourse.slimframework.com/u/odan)\
**Post date:** [March 3, 2023, 5:40pm UTC](https://discourse.slimframework.com/t/localhost-issues-with-xampp/5543/6 "2023-03-03T17:40:52Z")

</div>

I have tried to run your repo on my machine and it works. If you need consultancy, you can contact me directly.

---

<div class="post-metadata">

**Author:** ![n2fole00](https://avatars.discourse-cdn.com/v4/letter/n/e47774/32.png) [@n2fole00](https://discourse.slimframework.com/u/n2fole00)\
**Post date:** [March 3, 2023, 6:56pm UTC](https://discourse.slimframework.com/t/localhost-issues-with-xampp/5543/7 "2023-03-03T18:56:44Z")

</div>

Thanks, but I have it sorted. It turned out to be some weird browser thing. I’m using Brave browser which is based on chrome. If I opened a private window, it works just fine. If I even switch profiles, it works fine. I even disabled the pluggins (there were only 2), and Brave’s Sheilds up and still have the same issue. So I don’t know what the problem is, but I can mitigate by not using my current browser profile to to develop.

If anyone else has this issue, try a private window.

Thanks again.

---

<div class="post-metadata">

**Author:** ![n2fole00](https://avatars.discourse-cdn.com/v4/letter/n/e47774/32.png) [@n2fole00](https://discourse.slimframework.com/u/n2fole00)\
**Post date:** [March 3, 2023, 7:31pm UTC](https://discourse.slimframework.com/t/localhost-issues-with-xampp/5543/8 "2023-03-03T19:31:59Z")

</div>

Ok, after more thinking, I opened the network tab of the request and noticed it was actually a 301 being returned. I googled this for localhost and it turns out that browsers can cache this and will always serve it. So to get rid of it, you need to flush the cache (I actually flushed the browser history, but I think flushing the cache would do the same).

Don’t know why I didn’t think to investigate the network tab first, but live and learn peeps.
