Redirecting a CSS file based on .htaccess rules.
Posted
by
Anthony Hiscox
on Pro Webmasters
See other posts from Pro Webmasters
or by Anthony Hiscox
Published on 2011-02-16T18:20:25Z
Indexed on
2011/02/21
23:33 UTC
Read the original article
Hit count: 384
apache2
|mod-rewrite
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://osticket.cts/helpdesk/scp/css/main.css and I would like it to use the css file at http://osticket.cts/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} ^osticket\.cts$ [NC]
RewriteRule ^(.*)main\.css$ /test.css [NC, L]
© Pro Webmasters or respective owner