No subject
Ben Lancaster
benlancaster at holler.co.uk
Thu Dec 22 11:11:27 UTC 2011
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 at nginx.org wrote on 22/12/2011 10:46:46:
> From: "escavern" <nginx-forum at nginx.us>
> To: nginx at nginx.org
> Date: 22/12/2011 10:46
> Subject: Need this htaccess url rewrite to Nginx rewrite
> Sent by: nginx-bounces at 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 at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20111222/4dffaaea/attachment.html>
More information about the nginx
mailing list