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

Search Engine Optimization for Modern Campus CMS Calendar

You can make the public events pages of the Modern Campus CMS Calendar friendly for search engine optimization (SEO). Optimizing for search engines removes the hash character (#) from all calendar URLs. This change requires some configuration on your production server.

These instructions assume you placed the calendar embed code on a page located at: /calendar/index.html, otherwise adjust the configuration to meet your needs.

  1. Create a new file named .htaccess with the following content:
    <IfModule mod_rewrite.c>
        RewriteEngine On
        # remove index.html if index.html is included in the URL.
        RewriteCond %{REQUEST_FILENAME} index.html
        RewriteRule (.*) /calendar/ [R=301,L]
        # otherwise serve everything through given directory.
        RewriteBase /calendar/
        RewriteRule ^index\.html$ - [L]
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule . /calendar/ [L]
    </IfModule>
  2. On your production server, upload the .htaccess file to the folder where the calendar public events page is located, for example /calendar/.
  3. In your embed code, add the attribute data-basepath="/calendar/" to the to the opening omnicms-calendar tag.
    • If the public events page of your calendar is not located at /calendar/, replace with your specific root-relative file path.
      <omnicms-calendar data-calendar-id="6a774d2c-9735-40b7-9459-cb7d95fce228" data-basepath="/calendar/"></omnicms-calendar>
      <script>
          (function(src) {
              if (document.querySelector(`script[src="${src}"]`) !== null) return;
              const s = document.createElement('script');
              s.async = true;
              s.src = src;
              s.id = 'omnicms-calendar';
              document.getElementsByTagName("head")[0].appendChild(s);
          })('https://widget.calendar.moderncampus.net/app.js');
      </script>
  4. Publish the page that contains the embed code, for example /calendar/index.pcf.
    • Note that the URL no longer includes a hash character (#).

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