lighttpd/gpeasy
author Tomas Zeman <tomas@functionals.cz>
Fri, 31 Dec 2021 12:25:17 +0100
changeset 41 c4f9f37e9a28
parent 11 da454bf1bf63
permissions -rw-r--r--
Fossil SCM: Linking Tickets to Checkin's http://chiselapp.com/user/cutterpillow/repository/fossil-iOS/wiki?name=Cookbook#ticket-checkin-links

Rewrite rules for gpeasy:

url.rewrite-if-not-file = (
  "^/([^.?]*)\?(.*)$" => "/index.php?$1&$2",
  "^/([^.?]*)$" => "/index.php?$1",
)

Based on following article: configuring w/ nginx:

http://www.computercorrect.com/2011/web-applications/configuring-nginx-for-gpeasy-cms/

First, you should edit the index.php file in gpEasy’s root directory. Uncomment
the line that mentions “gp_indexphp”, so that your file looks likes this:

1 //define('gpdebug',true);
2 define('gp_indexphp',false);
3 //define('gptesting',true);
4 require_once('./include/main.php');

This tells gpEasy to use permalinks without “index.php” appearing in the URL.

Next, you need to edit the appropriate nginx site configuration file so that is
has a conditional rewrite rule like the one below:

1 location /gpeasy/ {
2 
3 index   index.php index.htm index.html;
4 
5 if (!-e $request_filename){
6 rewrite ^(.+)$ /gpeasy/index.php?$1 last;
7 }
8 
9 }

(Note that if your gpEasy installation is in your site’s root directory, then
you’ll replace “/gpeasy/” with “/” throughout the block above.)

Lastly, restart nginx and proceed with the installation of gpEasy.