Apache Rewrite rules for old bookmarked URLs
Hi Team,
I have a requirement where I need to redirect old domain URLs to new domain.
Old URL patteren: https://live.test.com/%23document%2F1533623%3Fpref%3D20058%2F9%2F5%26crumb%3D104
When user access above link then I need to redirect above old URL to new URL mentioned below
New URL: https://prod.test.net/document?page=1533623&id=58
Note:
- Old URI is in encoded format. will apache auto decodes this?
- The number in old URL 1533623 is the value for query param page in the new URL.
- The number in old URL 20058 needs to be converted to 58 in the new URL as a value of param id.
Could you please share apache mod rewrite rules for this requirement?
@kautuk_sahni @aanchal-sikka @lukasz-m
Thanks.