Howdy folks! I have this little problem. I have a php script called
highlight.php that takes a .java file and prints it out with the Text Highlighter package from PEAR. Apache comes in when I write a RewriteRule in
.htaccess that will take anything with .java
s and send it to my php script. Here's the RewriteRule:
Code:
RewriteEngine on
RewriteRule ^(.*?)\.(java|JAVA)s|S$ highlight.php?file=$1.$2
Now for the problem. Apparently Joomla! uses some file called
includes/js/joomla.javascript.js and my RewriteRule interferes with this file and makes it
joomla.java.
This is the error I'm getting:
Code:
[24-Mar-2009 14:57:47] PHP Warning: file_get_contents(includes/js/joomla.java) [<a href='function.file-get-contents'>
function.file-get-contents</a>]: failed to open stream: No such file or directory in ~/public_html/highlight.php on line 15
I've been online for hours studying different sites about regular expressions and scratching my head and getting no where's. I thought that the $ at the end of the regexp would only match if it was indeed the end of the string. Any suggestions would be
much appreciated.