• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

ico BUG

#1
I use Litespeed+nginx... If I set below
location ~* .(jpg|jpeg|gif|png|swf|htm|html|rar|zip|7z|xml|ico){
root /home/wwwroot/xf4.org/public_html;
expires 30d;
}
Click
2.jpg
Error like this.(ps.only Edit Resource Icon error)
1.jpg

If I remove |ico
location ~* .(jpg|jpeg|gif|png|swf|htm|html|rar|zip|7z|xml){
root /home/wwwroot/xf4.org/public_html;
expires 30d;
}
Everything is ok...
 

Jeremy

Well-known member
#2
Quick search gave me this:
http://www.nginxtips.com/nginx-location-directive/

However, since you are using a RegEx to match routes, the period (.) matches any character, so /ico in the url to edit the icon matches as well as .ico, thus giving you your 404 error. You should use the following:
location ~* \.(jpg|jpeg|gif|png|swf|htm|html|rar|zip|7z|xml)

It should work.