I am using Apache web server "httpd-2.4.25-win64-VC14" which is integrated with JBoss. The Port redirect is working properly. Now i want to replace URL based on some condition let's say if URL contains 'Mobile'
then i want to replace it with 'Mobile/web'
and forward it.
For this I am using <Directory>
tag enclosed within <VirtualHost>
tag. Now most the online references I am finding are having URL's in front of tag such as 'var/www/example'
but I want to redirect based on localhost
as I am running Jboss locallly.
So how should I write the tag contents , i tried with the below
<VirtualHost *:80>
<Directory /var/www/example/>
Allow From All
RewriteEngine On
RewriteCond %{QUERY_STRING} (manage)
RewriteRule ^Mobile http://%{HTTP_HOST}/Mobile/web=%1 [NC,L]
</Directory>
</VirtualHost>
Like http://localhost:8081/Mobile/register
should be replaced with http://localhost:8081/Mobile/web/register
Please Suggest