Bug 983115 - Custom redirects do not seem to work
Custom redirects do not seem to work
Status: CLOSED NOTABUG
Product: JBoss Enterprise Portal Platform 6
Classification: JBoss
Component: Portal (Show other bugs)
6.1.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Default User
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-10 10:19 EDT by Dominik Pospisil
Modified: 2013-11-04 19:56 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-10 11:09:55 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dominik Pospisil 2013-07-10 10:19:18 EDT
Description of problem:

I have tried to configure custom redirect rules but they do not seem to work.

What I have tried

1) add custom redirect based on UserAgent property containing "WebKit"
2) add custom redirect based on screen.width property

My experience was that the UserAgent based property never triggered a redirect and screen.with property based redirect allways trigered the redirect regardles the values set.



Steps to Reproduce
1. Create new "Test" site
1. Go to Administration / Site Redirects & Import Exports
2. Select classis site
3. Click Add redirect button
4. Set "Redirect to" to "Test"
5. Click "Add Condition" button
6. Put "(?i)WebKit" to "Contains" field
7. Click Save Changes
8. Click Save Changes on redirect page
9. Open "http://localhost:8080/portal" page with an browser which sends "WebKit" as a part of UserAgent string


Actual results:
No redirect happend

Expected results:
Automatic redirect to "Test" site should happen

The second scenario is similar:

1. Create new "Test" site
1. Go to Administration / Site Redirects & Import Exports
2. Select classis site
3. Click Add redirect button
4. Set "Redirect to" to "Test"
5. Click "Add Condition" button
6. Click "Add property"
7. Put "screen.width" in the property name
8. Choose "Between" operator
9. Put some weird values in interval input fields - e.g. (111 and 112)
10. Click Save Changes
11. Click Save Changes on redirect page
12. Open "http://localhost:8080/portal" page 

Actual results:
The browser is allways redirected to "Test" site

Expected results:
Automatic redirect to "Test" site should not happen as the screen size is not in between selected values.
Comment 2 Matt Wringe 2013-07-10 11:09:55 EDT
Closing as not a bug. Please re-read the documentation on how redirects work.

It only checks the first time a browser has ever accessed the page and then stores the site preference in a cookie. If you access the site and you already have the cookie set to your preference, it doesn't look at the newly changed redirect rules.

If you are testing redirects, the easiest way is to close all private browsing windows and open a new one, this should open a browser without any cookies.

Note You need to log in before you can comment on or make changes to this bug.