I really need to have a period in either a parameter or a route but lite-server seems to object to this.
I have found several places referencing the issue and saying that it can be fixed with a rewrite rule but there are no complete examples that I can see that work.
For instance this answer: "dot" in query string parameter - AngularJS
The path that can have a dot in it is /report;url=example.com
.
Based on above answer I editted bs-config.json to this:
{
"server": {
"baseDir": "src",
"routes": {
"/node_modules": "node_modules"
},
"rewrites": [
{
"from": "/^\/report/",
"to": "index.html"
}
]
}
}
I also tried putting rewrites a level higher but neither had any effect on anything.
If I use navigate('report/', { url: 'value.with.dot' })
then I can use a period in the route or param and it works fine but I can't access it directly by typing in the url to browser.
I find lots of mentions on the internet about this being due to lite-server config but no straight forward example of what exactly to add to the lite-server config to fix it.
I am using Angular2.4 but i think this is problem specific to lite-server.
So essentially I need a rewrite rule to re-write the request to index.html but the way i have entered it has not worked.