My root already has all the css and image files I require
- www.example.com (my domain)
- www.example.com/css/style.css (my styles)
On my hosting, my sub domain has to live inside a folder
root folder
public_html/
index.php
css/
style.php
subdomains/
admin/
.htaccess
index.php
How can I use mod_rewrite in my subdomain to redirect requests for css into my root folder?
FINAL SOLUTION
Thanks! I used Shikhar's answer and modified it to also work with images and js.
RewriteCond %{HTTP_HOST} admin.example.com
RewriteCond %{REQUEST_URI} [css|images|js]/(.*)\.(.*)
RewriteRule (.*) http://www.example.com%{REQUEST_URI} [R=301,NC,L]