Home

Results 1 to 2 of 2

Thread: Rewriter problem with Moodle site & quoted slashes

Threaded View

  1. #1
    Join Date
    Nov 2007
    Location
    Adelaide, Australia
    Posts
    95

    Rewriter problem with Moodle site & quoted slashes

    Hi, Having some trouble with our Moodle site when accessing it via Access Manager - some URLs are not being re-written, so they point to the internal DNS name, which is not published externally.
    From what I can see, the issue is that Moodle is quoting slashes with backslashes in some of the URLs that are part of some sort of variable assignment, presumable php code.
    Here's an example of the HTML as seen by the client externally:
    HTML Code:
    M.cfg = {"wwwroot":"http:\/\/webserver.mydomain\/moodle","sesskey":"4Zsjb7OgAg","loadingicon":"http:\/\/webserver.mydomain\/moodle\/theme\/image.php\/clean\/core\/1422437734\/i\/
    loading_small","themerev":"1422437734","slasharguments":1,"theme":"clean","jsrev":"1422437734","svgicons":true};var yui1ConfigFn = function(me)
     {if(/-skin|reset|fonts|grids|base/.test(me.name)){me.type='css';me.path=me.path.replace(/\.js/,'.css');me.path=me.path.replace(/\/yui2-skin/,'/assets/skins/sam/yui2-skin')}};
    var yui2ConfigFn = function(me) {var parts=me.name.replace(/^moodle-/,'').split('-'),component=parts.shift(),module=parts[0],min='-min';if(/-(skin|core)$/.test(me.name))
    {parts.pop();me.type='css';min=''};if(module){var filename=parts.join('-');me.path=component+'/'+module+'/'+filename+min+'.'+me.type}else me.path=component+'/'+component+'.'+me.type};
    The http:\/\/webserver.mydomain\/moodle should be re-written as https://moodle.mydomain/moodle, but the backslashes must be confusing things.

    Our re-writer config is pretty simple:
    Specify URL and/or string rewriting for HTML documents:
    Requested URLs to Search:
    If Requested URL Is:
    moodle.mydomain/*

    And Requested URL Is Not:
    No items

    And Document Content-Type Header Is:
    text/html [default]
    text/xml [default]
    text/css [default]
    text/javascript [default]
    application/javascript [default]
    application/x-javascript [default]
    application/json [default]


    N Rewrite Inbound Query String Data
    N Rewrite Inbound Post Data
    N Rewrite Inbound Headers
    Y Enable Rewriter Actions


    I'm not very familiar with configuring the re-writing (it was setup by someone else originally), so looking for some clues as to how to handle this sort of thing.
    I did try enabling the 3 Rewrite Inbound options above, but that didn't seem to alter anything.

    Cheers,
    Ian
    Last edited by imoore; 07-Apr-2017 at 06:09 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •