html – CSS and htaccess | Content is appearing on page output.

the aim; Redirecting all CSS files to another director.

malfunction; I have an HTML page. <style> body{color:red} </style>. However, whenever I enable the .htaccess component, the style “body {color: red}” content is placed on the page without tags, still reddening the text.

.htaccess file:

<IfModule mod_rewrite.c>
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d 
 RewriteCond %{REQUEST_URI} .(css|css3) [NC]
 RewriteRule ^(.*).(.*) /css/$1.css [NC,L]

.html file:

<!doctype html>
  <meta charset="utf-8">
  <p>Hello World</p>

Leave a Reply

Your email address will not be published.