Piwigo,相当不错的图库应用,基于PHP 和 Mysql。下面是Piwigo nginx 的伪静态设置。
一、Piwigo nginx rewrite 伪静态设置1、Piwigo后台,安装并启用插件LocalFiles Editor
加入:
$conf['php_extension_in_urls'] = false; $conf['question_mark_in_urls'] = false;2、伪静态规则
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; }二、Piwigo Apache伪静态设置1、Piwigo后台,安装并启用插件LocalFiles Editor
加入:
$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 内容
#htaccess piwigo AcceptPathInfo On RewriteEngine On RewriteCond %{REQUEST_URI} !.+php* RewriteCond %{DOCUMENT_ROOT}/$1\.php -f RewriteRule ^([^/]+)/?(.*)$ $1.php/$2 [L]推荐站内搜索:asp主机、虚拟主机香港主机、注册域名、如何注销域名备案、香港vps主机租用、备案网、域名备案号查询、域名和空间、香港服务器、美国服务器租用