Modern Campus Catalog Emblem Modern Campus CMS Emblem Modern Campus Curriculum Emblem Modern Campus Involve Emblem Modern Campus Lifelong Learning Extended Education Emblem Modern Campus Message Emblem Modern Campus Navigate Emblem Modern Campus Schedule Emblem Modern Campus Virtual Tours & Maps Emblem Modern Campus Lifelong Learning Workforce and Community Emblem Site Menu Open Site Menu Close

.htaccess File

The .htaccess file is a configuration file used by web servers to control site behavior such as redirects. With Modern Campus Hosting, you'll see a file named .htaccess in your site’s home (root) folder. When you add simple, one-line directives to the file they apply to that folder and all its subfolders.

To get started, set file access to Administrators Only and Publish to Production to No. Then,

  1. Click to open the .htaccess file.
  2. Add directives, with comments.
    • See the next section for sample directives you can use.
  3. Save.
  4. Publish.

If you encounter an error after publishing, you can use page versions to restore a previous version.

Inside the FileLink to this section

Use redirects and error pages to improve your website user's experience.

Redirects

To set up a temporary (302) or permanent (301) redirect, use one of the following example directives to your .htaccess file, placing each on its own line:

# Basic permanent redirect
Redirect 301 /old-page.html /new-page.html
# Basic temporary redirect
Redirect 302 /old-page.html /new-page.html

File Comments

To add a comment to the .htaccess file, start the line with #.

Need Help?Link to this section

Contact our CMS Support team via the Support Resource Portal (login required) to receive help with managing your .htaccess file.

By continuing to use this site, you agree to the storing of first- and third-party cookies on your device to enhance site navigation; analyze site, product, and service usage; and assist in our marketing and promotional efforts. Cookie Policy