[Xerte-dev] Re: Adding the html stuff to toolkits

Pat Lockley patrick.lockley at googlemail.com
Wed Oct 31 12:52:51 GMT 2012


the rewrite rules are wrong here - didn't check yesterday but as I am
the only person who speaks regexp

^preview_html5_([A-Za-z0-9]+)_([A-Za-z0-9]+)$

matches

preview_html_ THEN any letter, lower and uppercase and any number [AT
LEAST ONCE] THEN an underscore THEN any letter, lower and uppercase
and any number [AT LEAST ONCE]

The correct regexp is

^preview_html5_([0-9]+)_([A-Za-z0-9]+)$
/toolkits/preview_html5.php?template_id=$1&linkID=$2

On the assumption Link ID contains letters?

and rewriteRule ^play_html5_([A-Za-z0-9]+)$
/toolkits/play_html5.php?template_id=$1

becomes

rewriteRule ^play_html5_([0-9]+)$ /toolkits/play_html5.php?template_id=$1

As you don't need letters, just numbers

Should link ID also be on play?



More information about the Xerte-dev mailing list