Piwigo pseudo-static settings

Piwigo pseudo-static settings

Piwigo, a very good gallery application, based on PHP and Mysql. Below is the pseudo-static setup of Piwigo nginx.

1. Piwigo nginx rewrite pseudo-static settings
1. Install and enable the LocalFiles Editor plugin in Piwigo backend

join in:

 $conf['php_extension_in_urls'] = false; $conf['question_mark_in_urls'] = false;

2. Pseudo-static rules

 location / { index index.php; try_files $uri $uri/ @rewrite; } location @rewrite { rewrite ^/picture((/|$).*)$ /picture.php$1 last; rewrite ^/index((/|$).*)$ /index.php$1 last; rewrite ^/i((/|$).*)$ /i.php$1 last; # for piwigo-openstreetmap rewrite ^/osmmap((/|$).*)$ /osmmap.php$1 last; } location ~ ^(?P.+\.php)(?P/.*)$ { try_files $script_name =404; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$script_name; fastcgi_param PATH_INFO $path_info; fastcgi_param PATH_TRANSLATED $document_root$path_info; fastcgi_pass 127.0.0.1:9000; }

2. Piwigo Apache pseudo-static settings
1. Install and enable the LocalFiles Editor plugin in Piwigo backend

join in:

 $conf['question_mark_in_urls'] = false; $conf['php_extension_in_urls'] = false; $conf['category_url_style'] = 'id-name'; $conf['picture_url_style'] = 'file';

2. .htaccess content

 #htaccess piwigo AcceptPathInfo On RewriteEngine On RewriteCond %{REQUEST_URI} !.+php* RewriteCond %{DOCUMENT_ROOT}/$1\.php -f RewriteRule ^([^/]+)/?(.*)$ $1.php/$2 [L]

<<:  BandwagonHost: $11.99/year/512MB memory/10GB SSD space/1TB traffic/OpenVZ/Los Angeles/Fremont/Phoenix

>>:  FirstHeberg: €9.99/month/ATOM/2GB memory/1TB space/unlimited traffic/France

Recommend

Delimiter: $20/month/2 x Quad E5420 Xeon/8GB memory/500GB space/5TB traffic/1 IP

Delimiter has launched two preferential servers, ...

AbeloHost: $6.95/month/1GB RAM/60GB storage/unlimited traffic/KVM/Netherlands

AbeloHost, a Dutch hosting provider, should be a ...

Introduction to SharkSpace, an American hosting provider

SharkSpace is an American hosting company that pr...

MineCloud: $9.55/month/1GB RAM/15GB SSD space/300GB traffic/40Mbps/KVM/Hong Kong

MineCloud, a Chinese host, provides VPS based on ...