Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
41 lines (32 sloc) 1.39 KB
# phpwcms nginx configuration (examples)
#include mime.types;
#types {
# here are additional types
#video/ogg ogv
#video/ogg ogg
#video/webm webm
#}
index index.html index.php;
# All 404 error should link to phpwcms then
# it is easy to define internal routing/redirection
# error_page 404 /index.php?r404;
# Installed in Subfolder www.example.com/subfolder/
# error_page 404 /subfolder/index.php?r404;
# Use location - always start in Document Root
location / {
# location /subfolder/ { # If installed in a subfolder
if (!-e $request_filename){
# Redirect /en and /en/ to english home
rewrite "^/(en|de)(/{0,1})$" /index.php?$1/index break;
# Resized image /img/cmsimage.php/… -> /im/…
rewrite ^/im\/(.+?)$ /img/cmsimage.php?$1 break;
# File download /dl/… -> /download.php?…
rewrite ^/dl\/([a-fA-Z0-9]+)\/(.*?)$ /download.php?f=$1&$query_string break;
# In case of config setting `$phpwcms['rewrite_ext']='.html'` -> /alias.html (Default)
rewrite ^/(.+)\.html$ /index.php?$1&$query_string break;
rewrite ^/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.html$ /index.php?id=$1,$2,$3,$4,$5,$6&$query_string break;
# Rewrite anything else and link it against phpwcms
# Check redirect settings under admin in the backend
rewrite ^/(.+)/?$ /index.php?$1&$query_string;
}
}
You can’t perform that action at this time.