Answer the question
In order to leave comments, you need to log in
RewriteRule adaptation for nginx for SocialEngine
Friends, help. I'm trying to run SocialEngine directly under nginx/php-fpm, without Apache. It looks like three simple RewriteRule, but I've been sitting for the second hour without success.
Here's what's in the original:
How will it be in the nginx config?
The QSA flag, which was previously unknown to me, raises the most questions. I feel there is a trick somewhere in it.
RewriteCond %{REQUEST_URI} /index\.php
RewriteRule (.*) index.php?rewrite=2 [L,QSA]
RewriteCond %{REQUEST_URI} /$
RewriteRule (.*) index.php?rewrite=1 [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?rewrite=1 [L,QSA]
Answer the question
In order to leave comments, you need to log in
location /index.php {
rewrite ^(.*)$ /index.php?rewrite=2 last;
}
location / {
index = index.php?rewrite=1
if (!-e $request_filename) {
rewrite ^(.+)$ /index.php?rewrite=1 last;
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question