Links to documents in OpenKM are not working
Symptons
Links to documents into OpenKM are not working.
Cause
Are several causes:
- You have changed the application url.
- You have configured SSL and have not redirected correctly the http URL's to https.
- After an application upgrade the url have changed. Older /OpenKM/frontend/index.jsp?uuid=XXXX is now /OpenKM/frontend/index?uuid=XXXX
Solution
The easiest way to solve it is with Apache Redirect configuration, but all it depends in the type of url change, here some samples:
Case you have changed application url and added SSL at same time:
<VirtualHost *:80>
ServerName old.your-domain
RewriteEngine on
RewriteCond %{SERVER_NAME} = old.your-domain
RewriteRule ^ https://new.your-domain.com/%{REQUEST_URI} [L,QSA,R=permanent]
</VirtualHost>
Case index.jsp? has been changed in favour of index?:
<VirtualHost *:80>
ServerName openkm.your-domain.com
RedirectMatch ^/$ /OpenKM
# WebSocket support - needs proxy-wstunnel
ProxyPass /OpenKM/frontend/webSocket ws://127.0.0.1:8080/OpenKM/frontend/webSocket
ProxyPassReverse /OpenKM/frontend/webSocket ws://127.0.0.1:8080/OpenKM/frontend/webSocket
ProxyPass /OpenKM ajp://127.0.0.1:8009/OpenKM keepalive=On
ProxyPassReverse /OpenKM http://openkm.your-domain.com/OpenKM
# Redirect
Redirect 301 /OpenKM/frontend/index.jsp http://openkm.your-domain.com/OpenKM/frontend/index
ErrorLog /var/log/apache2/openkm-error.log
CustomLog /var/log/apache2/openkm-access.log combined
</VirtualHost>
Properties
Properties | |
---|---|
Date |
2017-03-24 |
Applies to |
|