Excel links not loading pages, but when the link is pasted in the browser it works.

前端 未结 3 1177
耶瑟儿~
耶瑟儿~ 2021-01-03 02:47

I have placed hyperlinks in an excel spreadsheet though my ruby-on-rails application. The links are to some privileged pages that require, After the login I am supposed to t

3条回答
  •  一生所求
    2021-01-03 03:19

    This issue normally happens in IE and i also faced the same problem.

    Solution to this is very simple

    1. Create a redirect.html page in your public folder (public folder because you are using ROR)
    2. Copy this to your redirect.html

    
    
    Please wait, loading your page... 
    
    
    
    

    1. The links you are constructing in excel should be modified

      For e.g Old link - http://test.com/post/comments/1 New link should be - http://test.com/redirect.html?page=post/comments/1

    2. You need to pass the part of URL (after base url) as a param

    How this works.

    When user clicks a link in excel it points to redirect.html and the javascript constructs the actual URL and redirects again to proper page, user will be navigated to actual page if already logged in else redirected to Login/Home page.

提交回复
热议问题