Links from one activity to another inside one Moodle course space should be added with auto-linking setting. Then relative linking inside the course space works also after copying/exporting the course space.
Moodle activity or resource link looks like this: https://moodle.jyu.fi/mod/wiki/view.php?id=142066
You can make the link relative by replacing the beginning of the address (https://moodle.jyu.fi -part) with two dots like this: ../mod/wiki/view.php?id=142066
With this procedure all links are working also in the course copies. This link shortening is not working with files.
1. Click right button of the mouse on the activity title and select Copy link address
2. Open the editor where you want to make the link, select or add the link text and choose link tool
3. Paste the copied link to Enter s URL field and create link.
Auto-linking is a feature by which words or phrases used within a Moodle site are automatically linked to glossary or database entries, or activity and resources within the course with the same name.
Putting Auto-linking on in Moodle course space:
1. Select in the course space More > Filters
2. From filters Activity names auto-linking select On and save changes
After setting this filter on Moodle changes all the activity names to links automatically. Filter will create links to an activity whenever the name of the activity (exact similar text!) is written in texts within the same course in which the activity is located. Do not add any other linking!
If you copy-paste the name of the activity or resource, delete the linking.
More detailed informatioin in Moodle Docs guide Auto-linking