Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-28030

Add config.php settings to allow plugins to rewrite output moodle_urls (eg clean / semantic urls)

XMLWordPrintable

    • MOODLE_20_STABLE, MOODLE_31_STABLE
    • MOODLE_31_STABLE
    • MDL-28030-cleanurls
    • Hide

      Install the clean_urls local plugin available here which uses these two hooks:

      https://github.com/brendanheywood/moodle-local_cleanurls

      Follow the install instructions:

      https://github.com/brendanheywood/moodle-local_cleanurls#installation

      Note this issue is purely just confirming that the two hooks are working, not the details of the cleanurls plugin. To test the 'url_rewrite' hook is working you should see that the urls are different eg urls like this:

      /course/SHORTCODE/forum/1-forum-name

      To test if the 'pre_head_content' hook is working view the source and you should see a base href link like this:

      <base href='http://moodle.blah.io/mod/forum/view.php?id=8'>

      Show
      Install the clean_urls local plugin available here which uses these two hooks: https://github.com/brendanheywood/moodle-local_cleanurls Follow the install instructions: https://github.com/brendanheywood/moodle-local_cleanurls#installation Note this issue is purely just confirming that the two hooks are working, not the details of the cleanurls plugin. To test the 'url_rewrite' hook is working you should see that the urls are different eg urls like this: /course/SHORTCODE/forum/1-forum-name To test if the 'pre_head_content' hook is working view the source and you should see a base href link like this: <base href='http://moodle.blah.io/mod/forum/view.php?id=8'>

      Clean URLs (a.k.a. Friendly URLs) are URLs that are rewritten to look like a directory structure rather than a PHP query. For example:

      Messy URL: http://example.com/course/view.php?id=1
      Clean URL: http://example.com/course/1

      All other modern Content Management Systems I've encountered [Drupal, WordPress, etc.] have some implementation of Clean URLs. This is because they serve a variety of crucial functions: easy to remember web addresses; search engine optimization; makes the site look more professional; etc. Ideally, site admins should be able to customize the clean URL for at least some kinds of content [i.e. Pages].

      This issue has been discussed in the forums for years. When will this feature be implemented?

            Votes:
            42 Vote for this issue
            Watchers:
            43 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.