Redirecting Self-Service to the Site Root
This article is relevant for schools moving from 8.8.x to 9.x.x.
For years, PowerCampus Self-Service sites were set up with a URL scheme like this:
https://selfservice.myschool.edu/selfservice/
https://selfservice.myschool.edu/soap/
https://selfservice.myschool.edu/webapi/
For several reasons, and especially with version 9.0 using a completely new technology stack, schools are choosing to use a scheme more like this:
https://selfservice.myschool.edu/
https://soap.myschool.edu/
https://webapi.myschool.edu/
If you are migrating to this newer scheme, you may wish to redirect the old /selfservice
, as many users might have bookmarked it. Here's an easy method.
First, we'll create a complex rule to redirect /selfservice/blahblah
to /blahblah
.
Next, we'll create a simple rule to redirect /selfservice
to /
.
- Install the URL Rewrite module in IIS. It's not built in; you must download it.
- Underneath your new Self-Service site, click into URL Rewrite and click Add Rule(s)...
- Choose Blank rule. Pick a descriptive name, like "Redirect Self-Service Site Root Complex."
- For the pattern, put
^selfservice/(.*)
^
represents the start of the input. The rewrite engine automatically cuts offhttps://selfservice.myschool.edu/
for you.(.*)
represents a capture group that we can refer back to later.
- Check Ignore case.
- Select Redirect for Action type.
- Type
/{R:1}
for the redirect URL./
indicates the site root.{R:1}
is a backreference that will fill in the contents of our capture group from earlier.
- Select Temporary (307) for Redirect type. We'll eventually change this to permanent, but if you make a mistake, it's nearly impossible to purge a messed-up permanent entry from your browser's cache.
Now that you've created the complex rule, create the simple rule. The steps are very similar:
- Underneath your new Self-Service site, click into URL Rewrite and click Add Rule(s)...
- Choose Blank rule. Pick a descriptive name, like "Redirect Self-Service Site Root Base."
- For the pattern, put
^selfservice
- Check Ignore case.
- Select Redirect for Action type.
- Type
/
for the redirect URL. - Select Temporary (307) for Redirect type.
Now, test, test, test! Once you're satisfied with your results, you can switch the redirect types to permanent (302).
Screenshot of finished rules:
No Comments