Move up when a page is not found
This commit is contained in:
parent
274366da0d
commit
a90abc799d
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
DocumentRoot /var/simpleWeb/apps/acoeur/public
|
DocumentRoot /var/simpleWeb/apps/acoeur/public
|
||||||
Alias /edit /var/simpleWeb/apps/acoeur/content
|
Alias /edit /var/simpleWeb/apps/acoeur/content
|
||||||
|
ErrorDocument 404 /404.html
|
||||||
|
|
||||||
<Directory /var/simpleWeb/apps/acoeur/*>
|
<Directory /var/simpleWeb/apps/acoeur/*>
|
||||||
AuthUserFile /home/manu/Adata/.htaccessPasswords
|
AuthUserFile /home/manu/Adata/.htaccessPasswords
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
// Move up when a page is absent
|
||||||
|
if (document.head.querySelector('meta[content="/404.html"]'))
|
||||||
|
document.location.assign('..')
|
||||||
|
|
||||||
// Add the proper absolute url to invitation link
|
// Add the proper absolute url to invitation link
|
||||||
document.querySelectorAll('aside#actions #invitation')
|
document.querySelectorAll('aside#actions #invitation')
|
||||||
.forEach(elt => elt.href += document.location.href)
|
.forEach(elt => elt.href += document.location.href)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user