Forum Moderators: phranque
I have the following RewriteRule in my .htaccess:
RewriteRule ^([^.]+)\.htm$ htmhandler.php [L]
It works. The idea being that any file requested in the webserver root ending in .htm will be redirected to the handler file which will do some work. I have *NO* .htm files in webroot so this works how I expect. Problem is it appears to work on *ALL* .htm files in nested directories. I don't tend to use htm files much, and if I do I call them .html so this didn't matter until I wanted to use tinyMCE.
For example it is looking for this file:
/includes/javascript/tiny_mce/themes/advanced/source_editor.htm
But the RewriteRule above is kicking in and sending the request to the htmhandler.
How do I specify to the RewriteRule only to rewrite .htm in webroot?
Thanks