So if I want to redirect my user somewhere else? For example:- User enters a URL for an opened online document, he/she should get redirected to a site page rather.
Edit :-
So my scenario is :- For every document in library a specific URL will be produced. If the User directly enters this URL he/she will get the document opened in online word/excel. This is where I want the user to get redirected to another specific URL(site page) rather then opening the word/excel online.