You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jai <ja...@gmail.com> on 2009/09/15 23:42:16 UTC

[users@httpd] Rewrite Rule question

We have folloeing rewrite rules in our apache configuration files.

RewriteRule ^/AuthenticateService/Agent/Authenticate
/AgentAuthenticationService/AgentAuthenticationSoapBindingImplBean [PT]
RewriteRule ^/AuthenticateService/Agent/Authorize
/AgentAuthenticationService/AgencyAuthorizationSoapBindingImplBean [PT]
RewriteRule ^/AuthenticateService/Agent/AuthenticateAndAuthorize
/AgentAuthenticationService/AgentAuthenticationAndAuthorizationSoapBindingImplBean
[PT]

In the above rewrite rule, first two works fine. We are having problem with
the last rule. It redirects to
/AgentAuthenticationService/AgentAuthenticationSoapBindingImplBean instead
of
/AgentAuthenticationService/AgentAuthenticationAndAuthorizationSoapBindingImplBean.
Is there any restriction in number of characters in rewrite rule? Could some
one help us to resove this issue?

Re: [users@httpd] Rewrite Rule question

Posted by Bob Ionescu <bo...@googlemail.com>.
2009/9/15 Jai <ja...@gmail.com>:
> We have folloeing rewrite rules in our apache configuration files.
>
> RewriteRule ^/AuthenticateService/Agent/Authenticate
> /AgentAuthenticationService/AgentAuthenticationSoapBindingImplBean [PT]
> RewriteRule ^/AuthenticateService/Agent/Authorize
> /AgentAuthenticationService/AgencyAuthorizationSoapBindingImplBean [PT]
> RewriteRule ^/AuthenticateService/Agent/AuthenticateAndAuthorize
> /AgentAuthenticationService/AgentAuthenticationAndAuthorizationSoapBindingImplBean
> [PT]

Problem: The pattern of the first rule matches requests which are
intended for the third rule.
Solution: Reverse the order (special patterns followed by more general
patterns) or change the regular expression to "not to match anything
followed by ....Authenticate", i.e., by marking "end of string" with a
$ sign:

RewriteRule ^/AuthenticateService/Agent/Authenticate$ /....

Bob

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Rewrite Rule question

Posted by André Warnier <aw...@ice-sa.com>.
Jai wrote:
...

  It redirects to
> /AgentAuthenticationService/AgentAuthenticationSoapBindingImplBean instead
> of
> /AgentAuthenticationService/AgentAuthenticationAndAuthorizationSoapBindingImplBean.
> Is there any restriction in number of characters in rewrite rule? 

I don't know, but looking at the above, if there aren't any yet, I vote 
to introduce some.
:-)


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org