We help IT Professionals succeed at work.

rewrite rule

Member_2_5912282
on
96 Views
Last Modified: 2017-04-08
hi all,
I have requirement where if I have entered URL it needs to rewrite to /login.html and once login done it needs to again rewrite  to /test/home.html

could someone provide rewrite condition or rules for this.?
Comment
Watch Question

Mukesh YadavFull Stack Developer
CERTIFIED EXPERT

Commented:
Can you please tell us which server-side technology you are using?

Author

Commented:
Adobe AEM is our app which serves live website and webserver 2.4 in front of wcm.
Dr. KlahnPrincipal Software Engineer
CERTIFIED EXPERT

Commented:
This would probably be easier on a standard server such as Apache, nginx or IIS.  In particular, on Apache such things are a two-line change using mod_rewrite.

I take it that there is no possibility of shifting to a different platform?

Author

Commented:
could you please provide rewrite rule.
its in same server not in different .
apache 2.4 version
Dr. KlahnPrincipal Software Engineer
CERTIFIED EXPERT

Commented:
Let us know the specific conditions under which you want the rewrites to occur.

Author

Commented:
use will hit www.xyz.com so once he hits it has to rewrite to /livs/bin login.HTML

after user login he need to rewrite to website home page.
for ex: /content/Apache/en/home.HTML
Dr. KlahnPrincipal Software Engineer
CERTIFIED EXPERT

Commented:
Have you got an external shell variable that indicates whether the session has successfully authenticated to whatever login process is being used?

Author

Commented:
authentication will be taken care by internal sling logins. we don't need to worry abt it.
Dr. KlahnPrincipal Software Engineer
CERTIFIED EXPERT

Commented:
That's not the issue.  mod_rewrite needs a way to know whether the session has been authenticated.  The simplest way to get this information into mod_rewrite is by a shell variable.

Author

Commented:
can you provide that rewrite lines?

Author

Commented:
is this done?
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Dr. KlahnPrincipal Software Engineer
CERTIFIED EXPERT

Commented:
Explanation provided; no solution available under specified conditions.  Points assigned to responding expert.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.