URL Rewriting
Hello Team,
Hope you are doing fine.
I need one small help regarding URL rewriting in Apache dispatcher :
REQUIREMENT:
This is my current rule for home page and other pages, it works fine.
# Homepage
#Homepage
RewriteRule ^/$ /en.html [R,L,ENV=REDIRECTCACHE:1]
# Base path prepend
RewriteCond %{REQUEST_URI} !^/dispatcher/.*
RewriteCond %{REQUEST_URI} !^/libs/.*
RewriteCond %{REQUEST_URI} !^/content/mysite-uk/.*
RewriteCond %{REQUEST_URI} !^/content/experience-fragments/.*
RewriteCond %{REQUEST_URI} !^/content/dam/.*
RewriteCond %{REQUEST_URI} !^/etc/.*
RewriteCond %{REQUEST_URI} !^/etc.clientlibs/.*
RewriteCond %{REQUEST_URI} !^/conf/.*
RewriteCond %{REQUEST_URI} !^/bin/.*
RewriteCond %{REQUEST_URI} !^/system
RewriteCond %{REQUEST_URI} !^/.well-known/.*
RewriteCond %{REQUEST_URI} !^/error/.*
RewriteCond %{REQUEST_URI} !^/robots.txt
RewriteCond %{REQUEST_URI} !^/BingSiteAuth.xml
RewriteRule ^(.*)$ /content/mysite-uk$1 [PT,QSA]
Now my new requirement is to add a keyword "cmsapp" between domain and main url.
for example:
1) To access home page, now, It should be like that
https://<domainName>/cmsapp --It should open /content/mysite-uk/en.html
Similarly,
2) for other pages,
https://<domainName>/cmsapp/product/coffee ----- It should open /content/mysite-uk/product/coffee.html
Could some one help me out please.
Regards,
AP

