Skip to main content

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 /.

  1. Install the URL Rewrite module in IIS. It's not built in; you must download it.
  2. Underneath your new Self-Service site, click into URL Rewrite and click Add Rule(s)...
  3. Choose Blank rule. Pick a descriptive name, like "Redirect Self-Service Site Root Complex."
  4. For the pattern, put ^selfservice/(.*)
    1. ^ represents the start of the input. The rewrite engine automatically cuts off https://selfservice.myschool.edu/ for you.
    2. (.*) represents a capture group that we can refer back to later.
  5. Check Ignore case.
  6. Select Redirect for Action type.
  7. Type /{R:1} for the redirect URL.
    1. / indicates the site root.
    2. {R:1} is a backreference that will fill in the contents of our capture group from earlier.
  8. 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:

  1. Underneath your new Self-Service site, click into URL Rewrite and click Add Rule(s)...
  2. Choose Blank rule. Pick a descriptive name, like "Redirect Self-Service Site Root Base."
  3. For the pattern, put ^selfservice
  4. Check Ignore case.
  5. Select Redirect for Action type.
  6. Type / for the redirect URL.
  7. 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:

selfservice redirect rules.png