COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Cognos Connection, Viewer, Scheduler => Topic started by: Dev1975 on 16 Sep 2015 05:11:34 AM

Title: Serving a particular page depending on user access
Post by: Dev1975 on 16 Sep 2015 05:11:34 AM
Hello Cognoisers,

Is there a way of making a setting in Apache that would take me to the Cognos Connection page but another user to a custom HTML page of my design when both of us access the same URL? At present the document root declaration is set to the Cognos Webcontent directory so anyone accessing the URL is taken to the Cognos Connection screen. What I would like is me to reach Cognos Connection from the URL but anyone else to get a custom HTML page.

Any suggestions?

TIA!
Title: Re: Serving a particular page depending on user access
Post by: Dev1975 on 23 Sep 2015 04:40:36 AM
Further update to this, I've found some articles on setting redirects using the mod_rewrite module. I've created a .htaccess file and some test html files to redirect to (these are all stored in the "webcontent" directory of the Cognos install, in line with the DocumentRoot setting in my httpd.conf), however this still doesn't work.

I've set it for testing so that if I come in via Firefox, I get shown a custom Firefox page and same for access via IE. The contents of .htaccess follow below:

Options +FollowSymLinks
RewriteEngine on

RewriteCond %{HTTP_USER_AGENT} MSIE
RewriteRule ^index.html https://server/index-IE.html [NC,L,R=301]
RewriteCond %{HTTP_USER_AGENT} Firefox
RewriteRule ^index.html https://server/index-mozilla.html [NC,L,R=301]

All requests to the Cognos page take me straight to the login page, regardless of whether I use IE or Firefox. Anyone know where I may be going wrong???
Title: Re: Serving a particular page depending on user access
Post by: Dev1975 on 05 Oct 2015 10:45:28 AM
Hi,

Anyone here used NGINX on Linux? It's supposed to help you write re-write rules for web URL access. Would it be possible to set it up so that if any user OTHER THAN a member of the Cognos SystemAdministrator group logs in to Cognos, they get re-directed to a custom page whereas a member of the group gets taken to the main Cognos page as normal?

Cheers,
Dev