[MAGNOLIA-6384] HostBasedRegexpVirtualURIMapping configuration in Magnolia 5.4.1 CE not working Created: 19/Sep/15  Updated: 21/Sep/15  Resolved: 21/Sep/15

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: 5.4.1
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Mathias Conradt Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Magnolia 5.4.1 CE


Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

I think I found a bug with Magnolia's HostBasedRegexpVirtualURIMapping. I am using Magnolia 5.4.1 CE.

I have the following pages:

and the following mapping configured:

My intention is that a request to:

http://www.area1.local:8888 /magnoliaAuthor/subarea/home

gets forwarded to the page: /area1/subarea/home

while a request to:

http://www.area2.local:8888/magnoliaAuthor/subarea/home

gets forwarded to the page: /area2/subarea/home

However, it does not work, the forwarding does not take place.

Looks like a bug in HostBasedRegexpVirtualURIMapping to me.


Interestingly, the following cases work though:

Alternative 1:

I change the `fromURI` to `/subarea/(.*).html` like this:

and then, a request to

http://www.area1.local:8888/magnoliaAuthor/subarea/home.html

gets forwarded to the page: /area1/subarea/home

However, I do not want to use the ".html" in the url.


Alternative 2:

Second option that works as well is using the HostBasedVirtualURIMapping instead of the HostBasedRegexpVirtualURIMapping, but of course, this approach is a bit tiring to configure for each url.

This makes my URI mapping work as intended, but I do not want to configure every possible fromURI but would rather like to use regular expressions.



 Comments   
Comment by Philipp Bärfuss [ 21/Sep/15 ]

The described behaviour can be conveniently configured in the multi site support in the enterprise edition of Magnolia. There is no attempt to support this in the community edition which supports one site.

Generated at Mon Feb 12 04:14:01 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.