これを行う私の試みは...
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule \.js$ js.php [L] ## This line is the one I tried to add
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
タグを使用する場合は、<script type='text/javascript' src='http://www.domain.net/myfile.js'></script>
通過させたいと思いjs.php
ます。
js.php
を使用してファイルを処理しますheader('....'); echo file_get_contents('myfile.js');
これを行うために非常に多くのことを試みましたが、以前にプロジェクトでこれを行ったことがありますが、やり直さなければならないので、今はどこで覚えていません:)
それが理にかなっていることを願っています...