5

I have a situation where i need to map a source url with out query string parameters to a internal destination url with query string, Lets say

/pag1 to /page2?Id=1

is this possible? it work if i insert external link but not with internal, I have tried to modify the raw value of the link but with no luck.

Update:

Using IIS rewrite module is not an option as the content editor needs to change the maps frequently in Sitecore, without deploying a config change or recycling the app pool.

They update a .csv that contains the mapping, then run a command which reads the .csv file entries, parse them, and create a corresponding mapping item in sitecore.

6

This is possible with the IIS rewrite module. This example comes from the Microsoft iis.net site:

to rewrite http://localhost/pag342 to: http://localhost/page2?id=342

you would need find a pattern by using a regular expression (^pag/([0-9]+) (this finds 342) and redirect it using an action:

page2?id={R:1}

A detailed guide on exactly your problem can be found here: https://www.iis.net/learn/extensions/url-rewrite-module/creating-rewrite-rules-for-the-url-rewrite-module

  • thanks Bas. but IIS rewrite module is not an option as the content editors need to change the rewrite frequently without deploying a config change or recycling the app pool. – Abdulrahman Awwad Nov 4 '16 at 18:09
0

There is this Sitecore module for URL Rewrite https://marketplace.sitecore.net/Modules/Url_Rewrite.aspx that should do a good job for you.

And also editors have access to edit the rules, as every setting is inside Sitecore as an Item. Plus this:

In addition to adding Site specific redirect capabilities, I have modeled the data structure to closely match the functionality of Microsoft's IIS Url Rewrite plugin.

So you should be able to have a rule that covers your needs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.