Welcome! Log In Create A New Profile

Advanced

Re: drupal clean urls

Francis Daly
September 08, 2013 05:12PM
On Sun, Sep 08, 2013 at 02:44:08PM -0400, adambot wrote:

Hi there,

not tested, and I don't know what exactly drupal expects, but...

> location @rewrite {

> rewrite ^blog/(.*)$ blog/index.php?q=$1;

That "rewrite" line is unlikely to do anything. The uri that "rewrite"
tests starts with a /, so "^blog" will never match.

Perhaps replace "blog" with "/blog" twice, and see if that does what
you want?

Separate from that, and this is more "busy work" than "actually broken"...

> location ~ blog/.*\.php$ {
> fastcgi_split_path_info ^(.+\.php)(/.+)$;

That line probably does nothing useful. There aren't many urls that
both end in ".php" and contain the string ".php/". Something like
/blog/one.php/two.php *would* match -- but does your drupal use urls
like that?

> Here is the error i am seeing in my log:
> [error] 12988#0: *1 open() "/var/www/html/blog/linux" failed (2: No such
> file or directory), client: 192.168.1.1, server: localhost, request: "GET
> /blog/linux HTTP/1.1", host: "example.com", referrer:
> "http://example.com/blog/"

I suspect that if you turned on the debug log, you'd see what rewrites
were actually used; and you could match that against what you expect
nginx to do.

But the blog -> /blog change may be enough to get things going.

f
--
Francis Daly francis@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

drupal clean urls

adambot September 08, 2013 02:44PM

Re: drupal clean urls

Francis Daly September 08, 2013 05:12PM

Re: drupal clean urls

adambot September 09, 2013 01:24AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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