[NGINX] Case Sensitive SWF Files

Results 1 to 4 of 4
  1. #1
    hi JackHoll is offline
    MemberRank
    Mar 2013 Join Date
    UKLocation
    469Posts

    [NGINX] Case Sensitive SWF Files

    Hi, I'm using nginx as a web server and my SWF files have turnt case sensitive. For example some of my files end in .SWF and because of this they come up as 404.

    Can anyone help me?

    My nginx config:

    server {
    listen 80 default_server;
    listen [::]:80 default_server ipv6only=on;


    root /usr/share/nginx/html;
    index index.php index.html index.htm;


    server_name *hidden*;


    location / {
    try_files $uri $uri/ =404;
    rewrite ^/(|/)$ /index.php?url=$1;
    rewrite ^/([a-zA-Z0-9_-]+)(|/)$ /index.php?url=$1;
    rewrite ^/(.*)\.htm$ /$1.php;
    rewrite ^/(|/)$ /dash.php?page=$1;
    rewrite ^/([a-zA-Z0-9_-]+)(|/)$ /dash.php?url=$1;
    rewrite ^/novote/register /register;
    rewrite ^/habbo-imaging/badge/([^/]+) /habbo-imaging/badge.php?badge=$1;
    }

    location ~* ^.+\.(jpg|jpeg|gif|png|ico|swf|SWF|flv)$ {
    access_log off;
    expires 30d;
    }

    location /ase {
    rewrite ^/ase/(|/)$ /ase/index.php?url=$1;
    rewrite ^/ase/([a-zA-Z0-9_-]+)(|/)$ /ase/index.php?url=$1;
    rewrite ^/ase/(.*)\.htm$ /ase/$1.php;
    }


    error_page 404 /404.html;
    error_page 500 502 503 504 /50x.html;
    location = /50x.html {
    root /usr/share/nginx/html;
    }


    location ~ \.php$ {
    try_files $uri =404;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_index index.php;
    include fastcgi_params;
    }
    }
    Thanks


  2. #2
    HostSavor.com Lewislol is offline
    MemberRank
    Jul 2013 Join Date
    498Posts

    Re: [NGINX] Case Sensitive SWF Files

    Have a look at this, this worked for me when I was doing one of my own projects.
    http://stackoverflow.com/questions/1...ive-with-nginx

  3. #3
    hi JackHoll is offline
    MemberRank
    Mar 2013 Join Date
    UKLocation
    469Posts

    Re: [NGINX] Case Sensitive SWF Files

    Quote Originally Posted by Lewislol View Post
    Have a look at this, this worked for me when I was doing one of my own projects.
    http://stackoverflow.com/questions/1...ive-with-nginx
    Thanks for the reply, I tried what you said and it's still bugged. Is it a case of me being stupid and mis-configuring it?

    What I added:

    location / {
    try_files $uri $uri/ =404;
    rewrite ^/(|/)$ /index.php?url=$1;
    rewrite ^/([a-zA-Z0-9_-]+)(|/)$ /index.php?url=$1;
    rewrite ^/(.*)\.htm$ /$1.php;
    rewrite ^/(|/)$ /dash.php?page=$1;
    rewrite ^/([a-zA-Z0-9_-]+)(|/)$ /dash.php?url=$1;
    rewrite ^/novote/register /register;
    rewrite ^/habbo-imaging/badge/([^/]+) /habbo-imaging/badge.php?badge=$1;

    location ~* /r63/hof_furni/ {
    # The tilde and asterisks ensure that this location will
    # be matched case insensitive. nginx does not support
    # setting absolutely everything to be case insensitive.
    # The reason is easy, it's costly in terms of performance.
    }

    location ~* /r63/ {

    # The tilde and asterisks ensure that this location will
    # be matched case insensitive. nginx does not support
    # setting absolutely everything to be case insensitive.
    # The reason is easy, it's costly in terms of performance.
    }
    }

  4. #4
    hi JackHoll is offline
    MemberRank
    Mar 2013 Join Date
    UKLocation
    469Posts

    Re: [NGINX] Case Sensitive SWF Files

    Considering I struggled so badly with this, I went for a simpler option by renaming every .SWF to .swf using the terminal. Incase anyone else needs it, here's what I did:

    First I selected my directory entering:

    cd /usr/share/nginx/html/r63/hof_furni
    Then I ran:

    for x in *.JPG; do mv "$x" "${x%.JPG}.jpg"; done
    This thread can be closed



Advertisement