Comment 3 for bug 484578

Revision history for this message
Alon Swartz (alonswartz) wrote :

I sent a message to MindTouch to get their take on the issue, but in the meantime you can use this workaround to rewrite deki/(files|pages) urls to prepend @api.

RewriteCond %{REQUEST_URI} ^/deki/(files|pages)/
RewriteRule ^/(.*)$ /@api/$1 [L,PT]

1. Update /etc/dekiwiki/apache.conf to include the above lines in the http(s) virtual hosts (see below for placement)
2. Reload the Apache configuration (/etc/init.d/apache2 reload)

Patch

     RewriteCond %{REQUEST_URI} !^/error/(.*)\.var$
     RewriteCond %{QUERY_STRING} ^$ [OR] %{REQUEST_URI} ^/Special:Search
     RewriteRule ^/(.*)$ /index.php?title=$1 [L,QSA,NE]
+
+ RewriteCond %{REQUEST_URI} ^/deki/(files|pages)/
+ RewriteRule ^/(.*)$ /@api/$1 [L,PT]
+
 </VirtualHost>

 <VirtualHost *:443>
     RewriteCond %{QUERY_STRING} ^$ [OR] %{REQUEST_URI} ^/Special:Search
     RewriteRule ^/(.*)$ /index.php?title=$1 [L,QSA,NE]

+ RewriteCond %{REQUEST_URI} ^/deki/(files|pages)/
+ RewriteRule ^/(.*)$ /@api/$1 [L,PT]
+
     # Bug: 5252 https rewrite/proxy rules
     RewriteCond %{HTTPS} =on
     RewriteCond %{REQUEST_URI} ^/@api/