Search code examples
.htaccessurlturbolinks

Turbolinks friendly URLs


165 / 5000 Resultados de traducción my problem is that when I try to enter a link with a friendly url turbolinks it gives me an error saying "Not acceptable" and asking me to complete it, for example.

    <a href="home?lang=es">home</a>

when I enter the turbolinks link it sends me the error 406 Not acceptable.

available variants "home.html"

I tried to solve in the .htaccess but every time I had to correct more errors and if I wanted to add another GET variable I had to create another friendly URL

    <a href="home?lang=es&id=1">home</a>

for it to work I had to add it like this

    <a href="home.html?lang=es&id=1">home</a>

for it i guess its because turbolinks looks for it without adding the html, but is there any way to make it add it or fix this error?

PD: I use turbolinks cdn, I don't use rails.


Solution

  • after some time searching in forums I found an answer in which I proposed to remove this.xhr.setRequestHeader ("Accept", "text / html, application / xhtml + xml") from turbolinks.js which worked perfect!

    original answer