diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-09-27 18:34:50 -0400 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-09-27 18:34:50 -0400 |
commit | 1a366910d30a0ff07a16f3d0505e0584a63a465a (patch) | |
tree | 49158d6fd910f30cca4c4cbbbac313cf0e5ced33 /doc/forum | |
parent | 2acaa15830760695eb673ddb0b17aed715e97f3c (diff) | |
parent | ba4071bde21a199e77f15b54d8785debc69613e6 (diff) |
Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info
Diffstat (limited to 'doc/forum')
-rw-r--r-- | doc/forum/missing_pages_redirected_to_search-SOLVED.mdwn | 36 | ||||
-rw-r--r-- | doc/forum/missing_pages_redirected_to_search.mdwn | 4 |
2 files changed, 36 insertions, 4 deletions
diff --git a/doc/forum/missing_pages_redirected_to_search-SOLVED.mdwn b/doc/forum/missing_pages_redirected_to_search-SOLVED.mdwn new file mode 100644 index 000000000..3af83396c --- /dev/null +++ b/doc/forum/missing_pages_redirected_to_search-SOLVED.mdwn @@ -0,0 +1,36 @@ +Is it possible to have any missing pages(404's) redirected to the search(omega) ? +So if someone comes to my site with http://example.com/foo_was_here it would result in 'foo_was_here' being passed as a search parameter to omega ? --[Mick](http://www.lunix.com.au) + +##DONE + +I use nginx instead of apache. +Just add the following to the `server` block outside of any location block in nginx.conf +You must also make sure you have setup and enabled the search plugin(omega) + + error_page 404 /ikiwiki.cgi?P=$uri; + + +My full nginx.conf + + server { + listen [::]:80; #IPv6 capable + server_name www.lunix.com.au; + access_log /var/log/nginx/www.lunix.com.au-access.log main; + error_log /var/log/nginx/www.lunix.com.au-error.log warn; + error_page 404 /ikiwiki.cgi?P=$uri; + + location / { + root /home/lunix/public_html/lunix; + index index.html index.htm; + } + + location ~ ikiwiki\.cgi$ { + root /home/lunix/public_html/lunix; + include /etc/nginx/fastcgi_params.cgi; + + fastcgi_pass 127.0.0.1:9999; + fastcgi_param SCRIPT_FILENAME /home/lunix/public_html/lunix$fastcgi_script_name; # same path as above + } + } + + diff --git a/doc/forum/missing_pages_redirected_to_search.mdwn b/doc/forum/missing_pages_redirected_to_search.mdwn deleted file mode 100644 index cd544ecaf..000000000 --- a/doc/forum/missing_pages_redirected_to_search.mdwn +++ /dev/null @@ -1,4 +0,0 @@ -Is it possible to have any missing pages(404's) redirected to the search(omega) ? -So if someone comes to my site with http://example.com/foo_was_here it would result in 'foo_was_here' being passed as a search parameter to omega ? --[Mick](http://www.lunix.com.au) - - |