I have an .htaccess file in a folder redirecting all CSS and JS files to a php file.
RewriteRule ^(.*\.(js|css)) process.php?file=$1
And it works fine into sub-directories as well, however I have a sub-directory containing an .htaccess file with:
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
For the purpose of using "clean URLs"
How can I force this sub-directory to still send the CSS/JS files through what's defined in the parent directory?
I know I can manually do this for that sub-directory by placing exception within the sub-directory's .htaccess file - but can I do it any other way?
This is for distribution so it will be a hell of a lot easier if I can somehow force the parent RewriteRule into all sub-directories regardless.
Thanks for any suggestions!
您可以尝试将此行放在RewriteEngine On
下方的子目录.htaccess中:
RewriteOptions inherit
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.