开发者

htaccess for static files in subdomain

开发者 https://www.devze.com 2023-01-21 00:34 出处:网络
I have the following in the htaccess of my main folder Options +FollowSymLinks RewriteEngine on RewriteRule ^css/(.*)\\.css$ - [L]

I have the following in the htaccess of my main folder

Options +FollowSymLinks
RewriteEngine on

RewriteRule ^css/(.*)\.css$ - [L]
开发者_开发问答RewriteRule ^(.*)\.css$ - [L]

The second rule works fine. That is, the CSS files in the main directory are accessed directly. However, this was not propagating to the directory "css". Hence I created the first rule. That is also not working.

Is there a particular reason why the rules don't propagate or am I missing something here?


I feel so stupid right now. Turns out the Rewrite rules were all correct. The error was with the folder permissions. Once that was set, the site is functioning as expected.

Just leaving this here in case someone gets stuck at the same point as I did!

0

精彩评论

暂无评论...
验证码 换一张
取 消