I want my js-files in the folder scripts to be redirected to a php which handels the caching. So the .htaccess looks like this:
Options +FollowSymLinks
RewriteEngine on
RewriteBase /eval/widget/scripts
RewriteRule ^(.*)\.js$ func.php?src=$1
The filename (without extension) should be passed to the php-file, but instead the src parameter is '开发者_StackOverflow中文版scripts/JAVASCRIPT_FILENAME'. What's wrong with this? Seems like RewriteBase doesn't set it correctly...
Change your rewrite rule to
RewriteRule ^.*?/(.*)\.js$ func.php?src=$1
You understanding of RewriteBase is incorrect.
精彩评论