Rupali,
This has gone around in circles for a while with no progress. Can you
please:
1. Show examples of what you would like. Specific examples, like:
"I expect that when requesting http://xyz.ae/apex/?f=1001" I get a 302
redirect to http://xyz.ae/apex/myapp"
That's what you are asking for, but I suspect that what you really want
is the reverse: users who request /myapp actually get "?f=1001".
This is further complicated by the fact that all your URLs show as
ayx.ae in text, but then have <xyz.com> added to the end for some
reason. Which is it?
Do you want an HTTP redirect? If so, what kind? Or do you want your
server to proxy from one URL to the other, so the client doesn't know
it's happening?
2. Which component should be responsible for all of this? You have
several networking components to choose from:
a. F5 load balancer
b. Oracle Apex
c. Apache Tomcat
Why have you decided to re-write your application's URLs at the Tomcat
level and not somewhere further up the chain?
3. Show exactly what you currently have in your rewrite config file, and
exactly where that rewrite configuration file is on the disk.
Going back to your original post, lots of things are confusing:
i. The URLs are inconsistent (.ae va .com, apex vs aorx)
ii. You appear to be asking to redirect from non-friendly URLs to
friendly URLs which doesn't make any sense. Perhaps this is a
terminology issue. You want clients to use the friendly URLs
(/apex/myapp) and then get what they would have received had they called
/f?p=1001 right?
iii. You are redirecting /myapp to /myapp in your example, which
accomplishes nothing. You also have the same rule twice.
This should be as simple as:
RewriteRule "^/f?p=1001" "/myapp"
... but it's not, because RewriteRule only looks at the path and not the
query string, so you need a separate condition. I'll repeat what Felix
(almost) posted a few days ago, which should be correct:
RewriteCond %{QUERY_STRING} p=1001
RewriteRule ^/f$ /apex/myapp
I don't think you even want the [R] flag because if you do that, the
client will see the URL change to the unfriendly URL, and the point is
to hide that from them, right?
The last thing to do is to make sure the file is *in the right place*.
No amount of configuration in C:\Windows\rewrite.config is going to have
any effect unless you have a very strange configuration.
-chris
On 3/24/22 14:23, rupali singh wrote:
hi,
yes context name is apex.
https://xyz.ae/apex/f?p=1001 <https://xyz.com/apex/f?p=1001> to
https://xyz.ae/apex/myapp <https://xyz.com/aorx/myapp>
we dont want to change xyz.ae that will name remain as it is , we want to
change f?p=1001 <https://xyz.com/apex/f?p=1001> to myapp
On Wed, 23 Mar 2022 at 19:23, Felix Schumacher <
felix.schumac...@internetallee.de> wrote:
Am 23. März 2022 12:14:25 MEZ schrieb rupali singh <
rupali.r.si...@gmail.com>:
Hi Chris,
I already tried with fully qualified name but its not working
Can you be more specific, what you tried?
Is Chris right and your context name is apex?
Felix
On Tue, Mar 22, 2022, 7:15 PM Christopher Schultz <
ch...@christopherschultz.net> wrote:
All,
On 3/21/22 10:19, Felix Schumacher wrote:
Am 21.03.22 um 06:39 schrieb rupali singh:
Hi Felix,
location of context.xml file is
cat context.xml| grep RewriteValve
<Valve
className="org.apache.catalina.valves.rewrite.RewriteValve"
/>
pwd
/opt/tomcat/apache-tomcat-9.0.54/instance/conf
That context.xml is thought to be a default template for all installed
webapps. It will work, but remember, that every installed webapp will
get its own copy of a rewrite valve.
+1
This is probably the problem.
more
/opt/tomcat/apache-tomcat-9.0.54/instance/webapps/ROOT/WEB-INF/rewrite.config
RewriteCond %{QUERY_STRING} p=10001
RewriteRule ^/apex/f$ /apex/myapp [R,L]
I think you want:
RewriteCond %{QUERY_STRING} p=10001
RewriteRule ^/f$ /myapp [R,L]
The prefix /apex is already a part of the context-path and should be
removed from the URL patterns being matched. If you want to redirect to
another web application, you need a fully-qualified redirect like this:
RewriteCond %{QUERY_STRING} p=10001
RewriteRule ^/f$ https://www.google.com/ [R,L]
-chris
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org