rewrite all requests from one folder to a parent folder htaccess

Posted by Neo on Stack Overflow See other posts from Stack Overflow or by Neo
Published on 2012-09-28T15:35:53Z Indexed on 2012/09/28 15:37 UTC
Read the original article Hit count: 193

Filed under:
|

This one has me stumped, I need to re-write all requests to the javascript folder (js) to a special library handler system.

e.g.

rewrite http://localhost/admin/js/bar.js  --> http://localhost/_lib/=admin/js/bar.js

Any ideas? I have tried the following which creates an error

RewriteCond %{REQUEST_URI} ^(.*)$
RewriteRule ^(.*)$ /%1/_lib/$1 [NC]

(36)File name to long: cannot map GET /admin/js/bar.js to file

© Stack Overflow or respective owner

Related posts about .htaccess

Related posts about mod-rewrite