I'm trying to move mayan to a subfolder http://www.domain.com:8000/ to https://www.domain.com/docs as mayan is not the only app I am integrating in my website.
I keep having a problem that url's are redirected with a # in front. I believe the following javascript is responsible for this in:
site-packages/mayan/apps/appearance/templates/appearance/base.html
Code: Select all
<script>
if (typeof partialNavigation === 'undefined') {
/* Check if the template was not loaded via AJAX
* If not then reload the root path passing the
* current location's path as the new hash
*/
document.write('<script type="text/undefined">')
var currentPath = window.location.pathname + window.location.search;
window.location = '/#' + currentPath;
}
</script>
My current setup is to run mayan-gunicorn via a unix socket and using nginx proxy running from the unix socket including let's encrypt and redirects and multiple other apps I use.
An example:
http://domain.com/docs
... redirects directly to...
https://www.domain.com/docs/
then the above script in turn adds the # and the link can't be found on the server...
https://www.domain.com/#/docs/
How can I overcome this problem? Some redirection rule or will that give problems for AJAX calls?
Kind regards,
Bastiaan