Question: I know this question has been asked already.

However, when I follow the answer given to that question it doesn't work.

This is my JS function and the relevant HTML

```js
function myFunction() {
  document.getElementById("submit").innerHTML = "LOADING...";
}
```

```html
 <input class="textbox" type="number" id="number"> 
    <button onclick="myFunction(document.getElementById("number").value)" class="Button" >Submit</button>
      <p id="submit"></p>
      <script type ="text/javascript" src="../src/index.js"></script>
```

Answer: 
You have to config your web server to response `index.html` when receive requests like `/place/66bb50b7a5`

[vue-router doc](https://router.vuejs.org/en/essentials/history-mode.html) have example configurations for Apache, nginx, IIS...

For MAMP (apache):

1. create an file name `.htaccess` in your MAMP `htdocs` folder
2. paste apache configuration from vue-router doc

`.htaccess`:

```
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.html$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.html [L]
</IfModule>

```
I've had the same problem and I've solved it.

my case in apache:

1. create `.htaccess` file in the same folder as index.html
2. copy-paste the following script, and all works charmly.

```
<IfModule mod_rewrite.c>
  Rew/riteEngine On
  RewriteBase /
  RewriteRule ^index\.html$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.html [L]
</IfModule>

```

Previously I found this script on [github](https://gist.github.com/mariojankovic/e39cce4fed0db39e21e29a1585fd2155)