Welcome! Log In Create A New Profile

Advanced

(no subject)

Ben Lancaster
December 22, 2011 06:12AM
I use this for the Symfony framework:

location / {

# Rule for static files
if (-f $request_filename) {
# Set the expires header
# expires 3h;
break;
}

rewrite ^(.*) /index.php last;
}

location ~ (.*\.php)($|/) {
set $script $1;
set $path_info "";

if ($uri ~ "^(.+\.php)(/.+)/?") {
set $script $1;
set $path_info $2;
}

if ($server_port = 80) {
set $https_enabled off;
}

if ($server_port = 443) {
set $https_enabled on;
}

fastcgi_pass 127.0.0.1:9000;

include fastcgi_params;
fastcgi_param HTTPS $https_enabled;
fastcgi_param PATH_INFO $path_info;
fastcgi_param SCRIPT_FILENAME $document_root$script;
fastcgi_param SCRIPT_NAME $script;
fastcgi_pass_header Set-Cookie;
}

nginx-bounces@nginx.org wrote on 22/12/2011 10:46:46:

> From: "escavern" <nginx-forum@nginx.us>
> To: nginx@nginx.org
> Date: 22/12/2011 10:46
> Subject: Need this htaccess url rewrite to Nginx rewrite
> Sent by: nginx-bounces@nginx.org
>
> Helo my friends,
>
> i have problem converting this .htaccess url rewrite to Nginx rewrite
> rule,,
>
----------------------------------------------------------------------------------------------------------
> RewriteEngine on
> RewriteRule ^(index\.php)?([a-z0-9]+)$ index.php?$2 [L]
>
----------------------------------------------------------------------------------------------------------
>
> any help will be appreciate ;-).
> Thanks
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,220385,
> 220385#msg-220385
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

(no subject)

Ben Lancaster December 22, 2011 06:12AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 163
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