Skip to content
Browse files

Redirect JS and send it as javascript

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 dcf3615da7bd76e930bef2690610575b9d600369
Showing with 10 additions and 0 deletions.
  1. +10 −0 mediawiki/.htaccess
@@ -1,7 +1,17 @@
<FilesMatch "\.js\?">
Header set Content-Type "text/javascript"

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

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.
You can’t perform that action at this time.