I'm not sure how to word this question so I'm sure the answer is out there but I'm using the wrong search words.

I have a URL where the end remains the same, but the beginning changes based on the specific user visiting the URL. I want to create a relative URL that brings each user to the appropriate page.

Eg: The URL is: https://mywebsitename.com/client-name/client-module/module/section/

"client-name" and "client-module" will change based on the logged in user, but every other aspect of the URL will remain the same.

Eg: Client 1 URL would be: https://mywebsitename.com/alex/alex-module/module/section/

Eg: Client 2 URL would be: https://mywebsitename.com/sarah/sarah-module/module/section/

Is there a way I can create a relative URL that always brings the user to the "section" page? I tried to use wildcards but I don't understand them. The /module/section page is only accessible from inside the https://mywebsitename.com/client-name/client-module page.


  • you will need to set up internal URL rewrite rules for this. a search for those keywords will turn up plenty of examples to try out. – majick Oct 9 '19 at 12:43

Your Answer

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

Browse other questions tagged or ask your own question.