Note that there are some explanatory texts on larger screens.

plurals
  1. PONginx rewrite all directory requests to index.php
    text
    copied!<p>Okay I'm kind of n00b on Nginx, and I've browsed through here and couldn't piece together an answer. SO here is what i got</p> <pre><code>server { root /usr/share/nginx/www; index index.php index.html index.htm; # Make site accessible from http://localhost/ server_name localhost; location / { # First attempt to serve request as file, then # as directory, then fall back to index.html if (-f $request_filename) { expires 30d; break; } if (!-e $request_filename) { rewrite ^(.+)$ /index.php?q=$1 last; } } location /dojump { rewrite ^/dojump/(.*)$ /dojump/index.php/$1 break; } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php(.*)$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi_params; } </code></pre> <p>This is on a wordpress setup the first location block should pass all file requests to the wordpress bootstrap. </p> <p>the <code>location /dojump</code> block is supposed to be for an outbound redirect script i have. I want to catch the arguments and pass them to the index.php script </p> <p>like /dojump/cnn.com to /dojump/index.php/cnn.com </p> <p>it works with apache with this simple <strong>.htaccess</strong> line inside the dojumps folder </p> <pre><code>RewriteRule ^(.*)$ index.php/$1 [L] </code></pre> <p>however, I get an nginx error in the <strong>error log</strong> </p> <pre><code>/usr/share/nginx/www/dojump/index.php/cnn.com" failed (20: Not a directory) </code></pre> <p>Any help? </p> <p>Thanks</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload