[opencms-dev] OpenCms 11.0.2: using rewrite rules in alias feature
Georg Westenberger
g.westenberger at alkacon.com
Fri May 21 17:34:47 CEST 2021
Hello,
> *A:*
>
> { 1 }{ 2 }{ 3
> }{ 4 }{
> 5 }
>
> /de/Afolderpart1-
> Afolderpart2/productname/productid/someoldnamewhichisnolongerneeded.html
>
> Will have the new structure
>
> *B:*
>
> { 1 }{ 2 }{ 4 }{
> 3 }
>
> /de/Bfolder1/Bfolder2/productid/productname.html
>
> That means:
>
> 1 stays the same in A and B
>
> 2 will change from one folder to two folders. Folder in A has always
> the same name. Folder 1 and 2 in B will always be the same name. àone
> folder in A will be replaced by two folders in be. They stay the same
> for all products.
>
> 3 in A will change position 4 in B
>
> 4 in A will change position 3 in B. 3 is dynamic but the same in A and
> B. Except, that in B “.html” is added
>
> 5 from A will no longer exist in B
>
> productid is always five numbers (12345)
>
> So can anyone tell, if such a scenario is possible with the about
> mentioned feature?
>
> I know, that this could be handled with Apache but we would like to
> manage all redirects in OpenCms.
>
This should work, as long as the /de is an actual folder and is not
generated by the OpenCms "single tree" localization mechanism:
Pattern: /de/(.+?)-(.+?)/(.+?)/(.+?)/[^/]+\.html
Replacement: /de/$1/$2/$4/$3.html
I'm not sure if it's possible when you're using the "single tree"
localization. It might work without the /de, but I haven't tried.
Regards,
Georg Westenberger
--
Alkacon Software GmbH & Co. KG - The OpenCms Experts
Georg Westenberger
An der Wachsfabrik 13
50996 Koeln, DE
Email: g.westenberger at alkacon.com
http://www.alkacon.com
http://www.opencms.org
Amtsgericht Köln, HRA 32185, USt-IdNr.: DE259882372
Vertreten durch: Alkacon Verwaltungs GmbH
Geschäftsführer: Alexander Kandzior, Amtsgericht Köln, HRB 88218
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.opencms.org/pipermail/opencms-dev/attachments/20210521/01007d28/attachment.htm>
More information about the opencms-dev
mailing list