Apache mod_rewrite static resource

My “.htaccess” file is here.

RewriteEngine On
RewriteRule .* route.php [L]

That is for the RestURI.
And I want to define RewriteRule for my static resources
The rule is here.

  1. URI pattern is “^.*/static/.+$” (Request : http://domain/root/static/css/style.css)
  2. Response resource from this location if pattern has matched (Location : /static/css/style.css)

How can I do that?
Thank you.


Source: apache

Leave a Reply