You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Motty Cruz <mo...@gmail.com> on 2016/05/16 18:20:38 UTC

[users@httpd] redirects on Apache 2.4.

Hello, I often sent users links to manual or howtos behind a portal that
requires username and password. However, users get redirected to homepage
after they successfully logged in. I suspect this htaccess file is the
cause.

 

My objective is to allow users to view any page only "if web_route" cookie
is present and if cookie is not present they would need to log in first. 

 

.htaccess:

 

## Can be commented out if causes errors, see notes above.

Options +FollowSymLinks

 

RewriteEngine on

RewriteBase /

 

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule . /index.php [L]

 

ErrorDocument 404 index.php

 

RewriteCond %{HTTP_COOKIE} !^.*web_route.*$ [NC]

RewriteRule ^
https://apps.mydomain.com/portal/account/LogOn?ReturnUrl=https://portal.mydo
main.com/ [R=301,L]