[opencms-dev] OpenCms 11.0.2: using rewrite rules in alias feature

Schliemann, Kai K.Schliemann at comundus.com
Thu May 20 21:31:27 CEST 2021


Hi there,

anyone already tested the regex feature for aliases?

I am talking about this screen:
[cid:image002.png at 01D74DAD.915F1E90]

We would like to automatically change URLs which have a certain structure “A” to structure “B".
Example:

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.

Thank you very much for until this line 😊… and for your help.

Best regards
Kai
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.opencms.org/pipermail/opencms-dev/attachments/20210520/1ef71fd6/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 46220 bytes
Desc: image002.png
URL: <https://lists.opencms.org/pipermail/opencms-dev/attachments/20210520/1ef71fd6/attachment.png>


More information about the opencms-dev mailing list