Welcome! Log In Create A New Profile

Advanced

Convert lighttpd rewrite rule to nginx

July 23, 2012 09:23PM
I have the following simple lighttpd rewrite rule:

$HTTP["host"] =~ "^(app\.mydomain\.com)$" {
url.rewrite-once = (
"^[^.]*$" => "controller.php/$1"
)
}

I am trying to port this rule to nginx and have the following:

server {
listen 80;

server_name app.mydomain.com;

if ($host = 'app.mydomain.com') {
rewrite ^[^.]*$ controller.php/$1 last;
}

root /srv/www/domains/app.mydomain.com;

index index.php;

access_log /var/log/nginx/domains/app.mydomain.com/access.log;
error_log /var/log/nginx/domains/app.mydomain.com/error.log;

include /etc/nginx/excludes.conf;
include /etc/nginx/php.conf;
include /etc/nginx/expires.conf;
}

The problem is that the rewrite rule for nginx is not working correctly? Any idea what I am doing wrong?

Thanks much.
SubjectAuthorPosted

Convert lighttpd rewrite rule to nginx

justinJuly 23, 2012 09:23PM

Re: Convert lighttpd rewrite rule to nginx

Edho AriefJuly 24, 2012 01:40AM

Re: Convert lighttpd rewrite rule to nginx

justinJuly 24, 2012 02:08AM

Re: Convert lighttpd rewrite rule to nginx

Edho AriefJuly 24, 2012 02:44AM

Re: Convert lighttpd rewrite rule to nginx

Igor SysoevJuly 24, 2012 02:50AM

Re: Convert lighttpd rewrite rule to nginx

justinJuly 25, 2012 08:47PM

Re: Convert lighttpd rewrite rule to nginx

Igor SysoevJuly 26, 2012 12:32AM

Re: Convert lighttpd rewrite rule to nginx

justinJuly 26, 2012 01:00AM

Re: Convert lighttpd rewrite rule to nginx

Edho AriefJuly 26, 2012 01:58AM

Re: Convert lighttpd rewrite rule to nginx

justinJuly 26, 2012 02:05AM

Re: Convert lighttpd rewrite rule to nginx

Edho AriefJuly 26, 2012 02:12AM

Re: Convert lighttpd rewrite rule to nginx

justinJuly 26, 2012 03:04AM

Re: Convert lighttpd rewrite rule to nginx

Edho AriefJuly 26, 2012 03:14AM

Re: Convert lighttpd rewrite rule to nginx

justinJuly 26, 2012 03:23AM

Re: Convert lighttpd rewrite rule to nginx

António P. P. AlmeidaJuly 26, 2012 03:38AM

Re: Convert lighttpd rewrite rule to nginx

justinJuly 26, 2012 03:42AM

Re: Convert lighttpd rewrite rule to nginx

Edho AriefJuly 26, 2012 03:48AM

Re: Convert lighttpd rewrite rule to nginx

justinJuly 26, 2012 08:52PM

Re: Convert lighttpd rewrite rule to nginx

justinAugust 03, 2012 07:40PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 70
Record Number of Users: 5 on May 17, 2013
Record Number of Guests: 138 on May 16, 2013
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready