Skip to content

Instantly share code, notes, and snippets.

@rchukh
Last active December 27, 2015 07:38
Show Gist options
  • Save rchukh/7290075 to your computer and use it in GitHub Desktop.
Save rchukh/7290075 to your computer and use it in GitHub Desktop.
missingDirRedirect
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#access_log logs/access.log main;
sendfile on;
keepalive_timeout 65;
server {
listen 8080;
server_name localhost;
if (!-d $request_filename) {
rewrite ^/(.*)/$ /$1 permanent;
}
location / {
try_files $uri $uri/ /index.php?$args;
root html;
index index.html index.htm;
}
location ~ \.php$ {
try_files $uri $uri/ /index.php?$args;
# Here goes the php configuration... we will use empty_gif; just to test whether it even gets here
empty_gif;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment