Welcome! Log In Create A New Profile

Advanced

Re: Help with convert .htaccess to nginx :(

March 21, 2012 03:54PM
I realize I'm responding to an old thread here, but thought I would post the configuration that I used to get this working:

location / {
try_files $uri $uri/ /index.php$uri?$args;
}

location = /robots.txt { access_log off; log_not_found off; }
location = /favicon.ico { access_log off; log_not_found off; }
location ~ /\. {access_log off; log_not_found off; deny all; }
location ~ \.(lock|conf)$ { access_log off; log_not_found off; deny all; }
location ~ pre_.+\.php { access_log off; log_not_found off; deny all; }
location = /test_rewrite1.txt { rewrite ^ /test_rewrite2.txt; }

location /js/i18n {
autoindex on;
}

location ~ \.php {
include fastcgi.conf;
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_pass unix:/tmp/php-fpm.sock;
}
Subject Author Posted

Help with convert .htaccess to nginx :(

Giang October 27, 2011 11:26PM

Re: Help with convert .htaccess to nginx :(

Edho Arief October 27, 2011 11:36PM

Re: Help with convert .htaccess to nginx :(

Edho Arief October 27, 2011 11:38PM

Re: Help with convert .htaccess to nginx :(

Giang October 27, 2011 11:58PM

Re: Help with convert .htaccess to nginx :(

makononov March 21, 2012 03:54PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 233
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready