[Xerte-dev] Re: .htaccess again!...

Tom Reijnders reijnders at tor.nl
Thu May 9 11:37:53 BST 2013


Ron,

Can you double-check the play_html5.php? That works on my website:


<?php

require_once(dirname(__FILE__) . "/config.php");

global $xerte_toolkits_site;

$extraparams = "";
if (isset($_REQUEST['LinkID']))
{
     $extraparams .= "&LinkID=" . $_REQUEST['LinkID'];
}

if (isset($_REQUEST['Page']))
{
     $extraparams .= "&Page=" . $_REQUEST['Page'];
}


header("Location: " . $xerte_toolkits_site->site_url . 
"play.php?engine=html5&template_id=" . $_REQUEST['template_id'] . 
$extraparams);



Tom

P.S. I received your message just now (12:05).

Op 8-5-2013 19:03, Ron Mitchell schreef:
>
> Hi
>
> I was just alerted to the fact that /play_html5_id links I'd 
> previously shared to lo's  are no longer working :-(
>
> I can live with that and update where I can but it also means that 
> links that Alistair and others have shared previously are also 
> currently broken. I know over time this will fade away as new links 
> are shared etc but this was something that we wanted to avoid if possible.
>
> Here's an example link that Alistair shared previously on the lists 
> which doesn't work at the moment:
>
> http://vle.jisctechdis.ac.uk/xerte/play_html5_300
>
> It obviously does now work via 
> http://vle.jisctechdis.ac.uk/xerte/play_300 and 
> http://vle.jisctechdis.ac.uk/xerte/play_300&engine=html
>
> But is there a change to the .htaccess rule I can make to still allow 
> http://vle.jisctechdis.ac.uk/xerte/play_html5_300 to work?
>
> The previous rule for this was: rewriteRule 
> ^play_html5_([A-Za-z0-9]+)$ /xerte/play_html5.php?template_id=$1
>
> But http://vle.jisctechdis.ac.uk/xerte/play_html5.php?template_id=300 
> no longer works so the shorter version doesn't either :-(
>
> Cheers
>
> Ron
>
> *From:*xerte-dev-bounces at lists.nottingham.ac.uk 
> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] *On Behalf Of *Ron 
> Mitchell
> *Sent:* 28 April 2013 15:59
> *To:* For Xerte technical developers
> *Subject:* [Xerte-dev] Re: .htaccess
>
> Hi Tom
>
> I just looked at the export links the install without htaccess was 
> generating via Fiddler and changed the order accordingly e.g. What 
> position template_id appears
>
> Cheers
>
> Ron
>
> Sent from my iPhone
>
>
> On 28 Apr 2013, at 14:15, Tom Reijnders <reijnders at tor.nl 
> <mailto:reijnders at tor.nl>> wrote:
>
>     Only if you replace the /xerte with * again.
>
>     And, please note, it solves the play and preview differently than
>     your suggestion.
>
>     For play your  suggestion accepts play_126_javascript, whereas my
>     solution accepts play_126?engine=javascript. The latter because
>     that's the way the wizard works now.
>
>     play_126 will choose the engine based on the default engine chosen
>     by the author.
>
>     Tom
>
>     P.S.  I don't understand why your modifications work, when the
>     original line doesn't, but I am glad it does.. :-)
>
>
>
>     Op 28-4-2013 14:51, Pat @ Pgogy schreef:
>
>         Is the htaccess.conf ok
>
>         Also the play/preview rules?
>
>
>         On 28 Apr 2013, at 13:50, "Ron Mitchell"
>         <ronm at mitchellmedia.co.uk <mailto:ronm at mitchellmedia.co.uk>>
>         wrote:
>
>             Hi Tom
>
>             no need. :-)
>
>             The attached works for me!
>
>             Basically changed the order of things in a couple of the
>             export rules:
>
>             previous line 54
>
>             rewriteRule ^export_full_([0-9]+)?(.*)$
>             /xerte/website_code/php/scorm/export.php?full=true&template_id=$1&scorm=false&$2
>
>             new
>
>             rewriteRule ^export_full_([0-9]+)?(.*)$
>             /xerte/website_code/php/scorm/export.php?full=true&scorm=false&template_id=$1&$2
>
>             previous 70
>
>             rewriteRule ^scorm_rich_([0-9]+)?(.*)$
>             /xerte/website_code/php/scorm/export.php?template_id=$1&data=rich&scorm=true&$2
>
>             new
>
>             rewriteRule ^scorm_rich_([0-9]+)?(.*)$
>             /xerte/website_code/php/scorm/export.php?data=rich&scorm=true&template_id=$1&$2
>
>             Cheers
>
>             Ron
>
>             *From:*xerte-dev-bounces at lists.nottingham.ac.uk
>             <mailto:xerte-dev-bounces at lists.nottingham.ac.uk>
>             [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] *On
>             Behalf Of *Tom Reijnders
>             *Sent:* 28 April 2013 11:38
>             *To:* For Xerte technical developers
>             *Subject:* [Xerte-dev] Re: .htaccess
>
>             Ok, I'll have a look, at why those don't work. I'll try to
>             set it up on one of my installations. Bit easier to
>             test... ;-)
>
>             Tom
>
>             Op 28-4-2013 11:39, Ron Mitchell schreef:
>
>                 Hi Tom
>
>                 my apologies. I just tracked back through my messages
>                 and missed your updated .htaccess partly because you'd
>                 renamed it as .txt but that's no excuse for not
>                 reading your message properly! :-(
>
>                 I've just put that in place and it seems deployment
>                 and 2004 export works but not archive or 1.2?
>
>                 <image001.jpg>
>
>                 Being dragged out now so will be offline for an hour
>                 or two :-0
>
>                 Cheers
>
>                 Ron
>
>                 *From:*xerte-dev-bounces at lists.nottingham.ac.uk
>                 <mailto:xerte-dev-bounces at lists.nottingham.ac.uk>
>                 [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] *On
>                 Behalf Of *Tom Reijnders
>                 *Sent:* 28 April 2013 10:22
>                 *To:* For Xerte technical developers
>                 *Subject:* [Xerte-dev] Re: .htaccess
>
>                 Ron,
>
>                 Apparently you didn't receive my reply on April 25?
>
>                 It oncluded a version that should have a working
>                 export for you. It's different than the one you have
>                 attached here, so I'll post it again.
>
>                 Tom
>
>                 Op 28-4-2013 11:03, Ron Mitchell schreef:
>
>                     I'm not sure how correct the attached is as it's
>                     something I edited over time while 1.9 was being
>                     developed. But it worked including export until
>                     the engine= changes and I know Tom was going to
>                     look at this further but probably hasn't had time
>                     yet. The normal play and preview work but export
>                     doesn't.
>
>                     Tom suggested the current line 12:
>
>                     rewriteRule ^preview_([A-Za-z0-9]+)?(.*)$
>                     /xerte/preview.php?template_id=$1&$2
>
>                     and that enables Ctrl + Play to toggle the engine
>                     and that works but I haven't been able to find a
>                     solution for export.
>
>                     Cheers
>
>                     Ron
>
>                     *From:*xerte-dev-bounces at lists.nottingham.ac.uk
>                     <mailto:xerte-dev-bounces at lists.nottingham.ac.uk>
>                     [mailto:xerte-dev-bounces at lists.nottingham.ac.uk]
>                     *On Behalf Of *xerte at pgogywebstuff.com
>                     <mailto:xerte at pgogywebstuff.com>
>                     *Sent:* 27 April 2013 23:58
>                     *To:* For Xerte technical developers
>                     *Subject:* [Xerte-dev] Re: .htaccess
>
>                     I have no idea what the export links are now, or
>                     what is in the htaccess
>
>                     If you send the links and the export reg exps I
>                     will have a look
>
>
>                     Pgogy Webstuff http://www.pgogywebstuff.com
>
>                     Makers of Web things of a fair to middling quality
>
>
>                         ----- Original Message -----
>
>                         *From:*
>
>                         "For Xerte technical developers"
>                         <xerte-dev at lists.nottingham.ac.uk
>                         <mailto:xerte-dev at lists.nottingham.ac.uk>>
>
>                         *To:*
>
>                         "For Xerte technical developers"
>                         <xerte-dev at lists.nottingham.ac.uk
>                         <mailto:xerte-dev at lists.nottingham.ac.uk>>
>
>                         *Cc:*
>
>                         *Sent:*
>
>                         Sat, 27 Apr 2013 20:56:07 +0100
>
>                         *Subject:*
>
>                         [Xerte-dev] Re: .htaccess
>
>
>
>
>                         Hi Pat/Tom/all
>
>                         is there a solution to this for Export before
>                         any of the engine changes Pat has listed are made?
>
>                         We've got a real problem on one of the Techdis
>                         installations now where I can't turn .htaccess
>                         use off because it would installantly break
>                         all the links to LO's Alistair and co have
>                         shared but at the same time at the moment with
>                         .htaccess on none of the export options work.
>                         I don't really want to revert the install back
>                         to before Tom's engine= changes but I've tried
>                         a few variations of rules to get export to
>                         work without success so far. Even if only
>                         archive export worked for now that would be
>                         better than no export working.
>
>                         Any suggestions?
>
>                         Cheers
>
>                         Ron
>
>                         BTW am I right in thinking the engine.fla
>                         still needs to be kept as Flash 8? I no longer
>                         have a Flash 8 install and wary of making any
>                         changes in CS4.
>
>                         *From:*xerte-dev-bounces at lists.nottingham.ac.uk <mailto:xerte-dev-bounces at lists.nottingham.ac.uk>
>                         [mailto:xerte-dev-bounces at lists.nottingham.ac.uk]
>                         *On Behalf Of *xerte at pgogywebstuff.com
>                         <mailto:xerte at pgogywebstuff.com>
>                         *Sent:* 25 April 2013 23:51
>                         *To:* For Xerte technical developers
>                         *Subject:* [Xerte-dev] Re: .htaccess
>
>                         Hello,
>
>                         HTaccess debugging
>
>                         One, the default engine link in the wizard *to
>                         me* doesn't follow the HTaccess approach
>
>                         So here are some new HTaccess rules
>
>                         These will work on a localhost/xertetoolkts
>                         install if
>
>                         rewriteBase /xertetoolkits is on
>
>                         rewriteRule
>                         ^preview_([A-Za-z0-9]+)_([A-Za-z0-9]+)$
>                         preview.php?template_id=$1&linkID=$2
>
>                         rewriteRule
>                         ^preview_([A-Za-z0-9]+)_([A-Za-z]+)$
>                         preview.php?template_id=$1&engine=$2
>
>                         rewriteRule
>                         ^preview_([A-Za-z0-9]+)_([A-Za-z]+)_([A-Za-z0-9]+)$
>                         preview.php?template_id=$1&engine=$2&linkID=$3
>
>                         In the wizard the following toggle needs to
>                         apply (I don't have flash on this computer)
>
>                         If apache is set the link becomes
>
>                         preview_idnumber
>
>                         if control is held down then then link is
>
>                         preview_idnumber_linkID
>
>                         if control is held down then the link is
>
>                         preview_idnumber_enginename (enginename is
>                         always text only  - no numbers and no ascii)
>
>                         if control and shift are both held down
>
>                         preview_idnumber_enginename_linkID
>
>                         Note enginename comes before linkID
>
>                         I don't have flash to fix this at home, but if
>                         some one can put the ifs into the wizard that
>                         should fix it
>
>
>                         Pgogy Webstuff http://www.pgogywebstuff.com
>
>                         Makers of Web things of a fair to middling quality
>
>
>                             ----- Original Message -----
>
>                             *From:*
>
>                             "For Xerte technical developers"
>                             <xerte-dev at lists.nottingham.ac.uk
>                             <mailto:xerte-dev at listsnottingham.ac.uk>>
>
>                             *To:*
>
>                             "For Xerte technical developers"
>                             <xerte-dev at lists.nottingham.ac.uk
>                             <mailto:xerte-dev at lists.nottingham.ac.uk>>
>
>                             *Cc:*
>
>                             *Sent:*
>
>                             Thu, 25 Apr 2013 23:18:41 +0100
>
>                             *Subject:*
>
>                             [Xerte-dev] Re: .htaccess
>
>                             I am now working in this area, let me see
>
>
>                             On 25 Apr 2013, at 20:40, Tom Reijnders
>                             <reijnders at tor.nl
>                             <mailto:reijnders at tor.nl>> wrote:
>
>                                 Ehmm, can I have your version of the
>                                 .htacces?
>
>                                 I mean how does you normal preview look?
>
>                                 I don't understand the /xerte/preview
>
>                                 The difference should be the ?(.*)
>                                 before the $ and the &$2 at the end.
>
>                                 Op 25-4-2013 20:44, Ron Mitchell schreef:
>
>                                     Hi Tom
>
>                                     rewriteRule
>                                     ^preview_([A-Za-z0-9]+)?(.*)$
>                                     */preview.php?template_id=$1&$2
>                                     worked for Ctrl + Play preview
>                                     although I obviously had to change
>                                     it to /xerte/preview.php rather
>                                     than */preview.php
>
>                                     I tried applying the same
>                                     principal to one of the export
>                                     rules but that didn't work -
>                                     probably due to my lack of
>                                     knowledge of regular expressions
>                                     etc :-(
>
>                                     Happy to test export additions?
>
>                                     I think ideally we need a
>                                     definitive \setup\htaccess.conf
>                                     for people to use for reference.
>
>                                     Cheers
>
>                                     Ron
>
>                                     *From:*xerte-dev-bounces at lists.nottingham.ac.uk
>                                     <mailto:xerte-dev-bounces at lists.nottingham.ac.uk>
>                                     [mailto:xerte-dev-bounces at lists.nottingham.ac.uk]
>                                     *On Behalf Of *Tom Reijnders
>                                     *Sent:* 25 April 2013 10:11
>                                     *To:* For Xerte technical developers
>                                     *Subject:* [Xerte-dev] Re: .htaccess
>
>                                     No, the wizard tries to load
>                                     preview.php and play.php, but it
>                                     doesn't add any sizes to the url,
>                                     like the xerte play and preview do.
>
>
>                                     The issue with .htaccess and xerte
>                                     preview is that now you can have
>                                     url parameters added to the
>                                     .htaccess urls, like
>                                     play_126?engine=other, and the
>                                     rules don't handle the
>                                     ?engine=other properly. I sent a
>                                     fix for Ron to try by PM, because
>                                     I couldn't send anything to the
>                                     list for some 30 minutes.
>
>
>                                     Tom
>
>                                     Op 25-4-2013 11:03, Julian Tenney
>                                     schreef:
>
>                                         OK. Does it impact the
>                                         re-write rule? At this point
>                                         I'd rather just make it work,
>                                         than be graceful... what I
>                                         think it means is that for
>                                         bootstrap tempaltes, the url
>                                         the wizard tries to load will
>                                         be preview_sitephp and
>                                         play_site.php? I'm not sure if
>                                         it affects what you're talking
>                                         about or not?
>
>                                         *From:*xerte-dev-bounces at lists.nottingham.ac.uk
>                                         <mailto:xerte-dev-bounces at lists.nottingham.ac.uk>
>                                         [mailto:xerte-dev-bounces at lists.nottingham.ac.uk]
>                                         *On Behalf Of *Tom Reijnders
>                                         *Sent:* 25 April 2013 10:01
>                                         *To:* For Xerte technical
>                                         developers
>                                         *Subject:* [Xerte-dev] Re:
>                                         .htaccess
>
>                                         I didn't change it (combine
>                                         preview of site and xerte)
>                                         because the url parameters
>                                         were different, and I felt we
>                                         hadn't time to test changes
>                                         thoroughly enough, so at the
>                                         moment I only changed the
>                                         absolute minimum.
>
>                                         Tom
>
>                                         Op 25-4-2013 10:09, Julian
>                                         Tenney schreef:
>
>                                             In the wizard (I think you
>                                             mean) is code that
>                                             launches the site template
>                                             that does something along
>                                             the lines of (if
>                                             templateruntime =
>                                             'preview_sitephp') blah
>                                             which launches the site
>                                             template in the
>                                             preview_site page. If you
>                                             remember, way back when,
>                                             when we originally
>                                             anticipated different
>                                             runtimes, we had a runtime
>                                             param in the xwd file to
>                                             point to alternative
>                                             renderers for content. If
>                                             you want to look it's in
>                                             function preview()
>
>                                             I would have thought that
>                                             when the recent
>                                             modularisation stuff was
>                                             done, this might have been
>                                             made redundant, or handled
>                                             differently, and maybe
>                                             this code should change?
>                                             But I don't have enough
>                                             sight of the other side of
>                                             the coin to know how?
>
>                                             *From:*xerte-dev-bounces at lists.nottingham.ac.uk
>                                             <mailto:xerte-dev-bounces at lists.nottingham.ac.uk>
>                                             [mailto:xerte-dev-bounces at lists.nottingham.ac.uk]
>                                             *On Behalf Of *Pat @ Pgogy
>                                             *Sent:* 24 April 2013 20:35
>                                             *To:* For Xerte technical
>                                             developers
>                                             *Subject:* [Xerte-dev] Re:
>                                             .htaccess
>
>                                             Looks like something is up
>                                             in the engine as well?
>
>
>                                             On 24 Apr 2013, at 19:41,
>                                             Tom Reijnders
>                                             <reijnders at tor.nl
>                                             <mailto:reijnders at tor.nl>>
>                                             wrote:
>
>                                                 Ah ok. olet me work on
>                                                 the rewriteRule,
>                                                 because it doesn't
>                                                 argin-bottom-alt:auto">if
>                                                 control and shift are
>                                                 both held down
>
>                                                     Just been testing
>                                                     this a bit more
>                                                     and for instance
>                                                     with the editor
>                                                     open clicking play
>                                                     to preview works
>                                                     fine with
>                                                     Apache/.htaccess
>                                                     enabled or not but
>                                                     clicking Ctrl +
>                                                     Play with
>                                                     Apache/.htaccess
>                                                     enabled results in
>                                                     http://vle.jisctechdis.ac.uk/xerte/preview_310&engine=other
>                                                     <http://vlejisctechdis.ac.uk/xerte/preview_310&engine=other>
>                                                     and so doesn't
>                                                     work ends up with
>                                                     a page not found
>
>                                                     What needs to
>                                                     change or be added
>                                                     to the .htaccess?
>
>                                                     e.g.
>
>                                                     NETGEAR VMDG485
>                                                     NETGEAR
>                                                     http://www.netgear.com/
>                                                     VMDG485 VMDG485
>                                                     VMDG485
>                                                     http://www.virginmedia.com/
>                                                     (unimplemented)
>                                                     uuid:upnp-WANConnectionDevice-1_0-20e52aba60fb
>                                                     (unimplemented)
>                                                     urn:schemas-upnp-org:service:WANIPConnection:1
>                                                     urn:upnp-org:serviceId:WANIPConn1
>                                                     /WANIPConnection.xml
>                                                     /WANIPConnection
>                                                     /WANIPConnection
>
>                                                     I think this is an
>                                                     important issue
>                                                     for those using
>                                                     .htaccess
>                                                     previously (e.g.
>                                                     Nottingham)
>                                                     because if Apache
>                                                     was switched off
>                                                     via management
>                                                     existing links
>                                                     would obviously
>                                                     break. But at the
>                                                     moment with Apache
>                                                     enabled I don't
>                                                     think export and
>                                                     Ctrl + Play works.
>
>                                                     HTH
>
>                                                     Cheers
>
>                                                     Ron
>
>                                                     *To:*
>
>                                                     "For Xerte
>                                                     technical
>                                                     developers"
>                                                     <mailto:xerte-dev-bounces at lists.nottingham.ac.uk
>                                                     <mailto:xerte-dev at lists.nottingham.uk>]
>                                                     *On Behalf Of *Pat
>                                                     @ Pgogy
>                                                     *Sent:* 22 April
>                                                     2013 20:05
>                                                     *To:* For Xerte
>                                                     technical developers
>
>
>
>
>
>                                 _______________________________________________
>                                 Xerte-dev mailing list
>                                 Xerte-dev at lists.nottingham.ac.uk
>                                 <mailto:Xerte-dev at lists.nottingham.ac.uk>
>                                 http://lists.nottinghamac.uk/mailman/listinfo/xerte-dev
>                                 <http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>                     _______________________________________________
>
>                     Xerte-dev mailing list
>
>                     Xerte-dev at lists.nottingham.ac.uk  <mailto:Xerte-dev at lists.nottingham.ac.uk>
>
>                     http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
>
>
>
>
>
>                 -- 
>
>                 --
>
>                   
>
>                 Tom Reijnders
>
>                 TOR Informatica
>
>                 Chopinlaan 27
>
>                 5242HM Rosmalen
>
>                 Tel: 073 5226191
>
>                 Fax: 073 5226196
>
>                   
>
>
>
>
>
>
>
>
>
>                 _______________________________________________
>
>                 Xerte-dev mailing list
>
>                 Xerte-dev at lists.nottingham.ac.uk  <mailto:Xerte-dev at lists.nottingham.ac.uk>
>
>                 http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
>
>
>
>
>             -- 
>
>             --
>
>               
>
>             Tom Reijnders
>
>             TOR Informatica
>
>             Chopinlaan 27
>
>             5242HM Rosmalen
>
>             Tel: 073 5226191
>
>             Fax: 073 5226196
>
>               
>
>             <.htaccess - Copy.txt>
>
>             _______________________________________________
>             Xerte-dev mailing list
>             Xerte-dev at lists.nottingham.ac.uk
>             <mailto:Xerte-dev at lists.nottingham.ac.uk>
>             http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
>
>
>
>
>
>
>
>         _______________________________________________
>
>         Xerte-dev mailing list
>
>         Xerte-dev at lists.nottingham.ac.uk  <mailto:Xerte-dev at lists.nottingham.ac.uk>
>
>         http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
>
>
>
>     -- 
>
>     --
>
>       
>
>     Tom Reijnders
>
>     TOR Informatica
>
>     Chopinlaan 27
>
>     5242HM Rosmalen
>
>     Tel: 073 5226191
>
>     Fax: 073 5226196
>
>       
>
>
>
>     _______________________________________________
>     Xerte-dev mailing list
>     Xerte-dev at lists.nottingham.ac.uk
>     <mailto:Xerte-dev at lists.nottingham.ac.uk>
>     http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
>
>
>
>
>
>
>
>
> _______________________________________________
> Xerte-dev mailing list
> Xerte-dev at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev

-- 
--

Tom Reijnders
TOR Informatica
Chopinlaan 27
5242HM Rosmalen
Tel: 073 5226191
Fax: 073 5226196

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte-dev/attachments/20130509/333af7a3/attachment-0001.html>


More information about the Xerte-dev mailing list