Symfony

Symfony is a web application framework written in PHP used to make writing tools easier. This page is still lacking very much information, but it's a start.

Rewrite rules
As the Toolserver does not use Apache, the rewrite rules specified in Symfony do not work as expected. This means that links to URLs without  do not work. However, using ZWS's rewrite rules, the functionality is possible.

The following code should be placed in /home/user/rewrite.script, replacing /~username/vpath/ and /home/username/realpath/web/ with the desired virtual path and the absolute path to the symfony web directory, respectively.

map path into SCRATCH:DOCROOT from / set SCRATCH:ORIG_URL = %{URL} set SCRATCH:REQUEST_URI = %{URL}
 * 1) get the document root
 * 1) initialize our variables

match URL into $ with ^([^?]*)\?(.*)$ if matched then set SCRATCH:REQUEST_URI = $1 set SCRATCH:QUERY_STRING = $2 endif
 * 1) If there's a query part split it off from `URL`
 * 2) We can access it later from `SCRATCH:ORIG_URL`

match URL into $ with ^/~username/vpath/(.*?).php(.*)$ if matched then goto QSA_RULE_START endif

match URL into $ with ^/~username/vpath/(.*)$ if matched then look for file in /home/username/realpath/web/$1 if not exists then set URL =/ ~username/vpath/index.php endif goto QSA_RULE_START endif

QSA_RULE_START: match SCRATCH:ORIG_URL into % with \?(.*)$ if matched then set URL = %{URL}?%{SCRATCH:QUERY_STRING} #set BODY=QUERY: %{URL} endif goto END QSA_RULE_END:
 * 1) append the query string if there was one originally
 * 2) the same as [QSA,L] for Apache