Mobile app version of vmapp.org
Login or Join
Nimeshi995

: Link re-interpreted by browser does not work I have a problem with links generated by php, for example this link works: http://masterarbeit-im-unternehmen.de/Thema_Analyse-und-Darstellung-der-%C3%B6kologischen-Vorteile-des-Remanufact

@Nimeshi995

Posted in: #Dynamic #Htaccess #Url #UrlRewriting

I have a problem with links generated by php, for example this link works:
masterarbeit-im-unternehmen.de/Thema_Analyse-und-Darstellung-der-%C3%B6kologischen-Vorteile-des-Remanufacturings-f%C3%BCr-die-Corporate-Responsibility-Strategie-und-Marketing-anhand-eines-Beispielprodukts-3966.html
but when that is opened in the browser it is turned into this link:

/Thema_Analyse%20und%20Darstellung%20der%20%C3%B6kologischen%20Vorteile%20des%0ARemanufacturings%20f%C3%BCr%20die%20Corporate%20Responsibility%20Strategie%20und%20Marketing%20anhand%20eines%0ABeispielprodukts-3966.html

Now, I have sent this link to other people but it does not open the page I want it to show. So my question are:


Why is the browser doing this re-interpretation of the url?
I try to catch the URL that is not working with .htaccess but I can't catch (but I can catch the url that is working) - what is happening?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Nimeshi995

1 Comments

Sorted by latest first Latest Oldest Best

 

@Cooney921

Starting on line 322 of your custom.js file you have this code as part of the carousel render:

var u=window.location.pathname;
u=u.substring(0,u.lastIndexOf("/")+1);
u+="Thema_"+encodeURIComponent(tpquestions[curidx].name)+"-"+tpquestions[curidx].id+".html";
if(!X4.config.isuser)
window.history.replaceState({qid:tpquestions[curidx].id},"",u);


The code is not especially clear, but it seems to be building a URL by encoding a "question" string (presumably this 'question' can contain spaces). It's then setting the URL to that (window.history.replaceState) if a condition fails. I guess this is what is causing the URL change you're seeing.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme