I'm trying to hack the CSS files on OSTicket by replacing them with my own custom ones when a specific URL is accessed.
The URL that is accessed for this example is:
http://example.com/helpdesk/scp/css/main.css
and I would like it to use the CSS file at:
http://example.com/test.css
Why won't this .htaccess file (in web root, not /helpdesk/scp/
) work? Is there an easy way to debug these rules, some way to find out what Apache did when the URL was accessed and where it's failing? error.log
doesn't show anything useful.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^(.*)main\.css$ /test.css [NC, L]