Skip to content

Commit

Permalink
Redirect JS and send it as javascript
Browse files Browse the repository at this point in the history
These two rules could probably be merged but leaving it like this for now.

There is a third JS file that I need to deal with separately.
  • Loading branch information
annashipman committed Jul 13, 2017
1 parent 93ccd2b commit dcf3615
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions mediawiki/.htaccess
@@ -1,7 +1,17 @@
<FilesMatch "\.js\?">
Header set Content-Type "text/javascript"
</FilesMatch>

<FilesMatch "\.php\?">
Header set Content-Type "text/html"
</FilesMatch>

RewriteEngine on
RewriteCond %{QUERY_STRING} (.+)
RewriteRule ^(index\.php)$ $1\%3F%1 [L]

RewriteCond %{QUERY_STRING} (.+)
RewriteRule ^(skins/common/wikibits\.js)$ $1\%3F%1 [L]

RewriteCond %{QUERY_STRING} (.+)
RewriteRule ^(skins/common/ajax\.js)$ $1\%3F%1 [L]

0 comments on commit dcf3615

Please sign in to comment.