Server Configuration
Why do I need this?
In the Vanilla Router Dom, things are handled with javascript. Under normal conditions, when a request like "https://example.com/path/to/page.html" comes to the server, the server will search for the file "page.html" in "/path/to/".
But like here, if you want to use a router plugin and want to return the contents of a file with a different name for "/path/to/page.html" requests, the server cannot understand it.
According to the working order in Vanilla Router, all requests (without changing the parameters in the search bar) should be sent to "index.html" and the rest should be done with javascript on "index.html", according to the incoming parameter.
In short, whatever the request is, the index.html file should be served by the server. (All routing plugins need this.)
Rendering configuration on Apache servers.
Create a file named ".htaccess" in your home directory and write the code below into the file, replacing "/path/to/" with your project's home directory.
In order to do this, you must have the necessary permissions to use the "RewriteEngine", "RewriteCond" and "RewriteRule" modes in your server's configuration files. (this is provided automatically on most servers)
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /path/to/index.html [L]
Rendering configuration on a server other than Apache.
For now, we only provide configuration example for Apache servers. Configuration example for servers other than Apache, will be added soon. If you want to research it yourself, search for ways to serve the "index.html" file on the server.