Forum: NGINX Nginx Drupal Rewrite

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
8258b301dc8e73c0ce419c61c1e21891?d=identicon&s=25 Claude Bing (Guest)
on 2009-05-16 18:17
(Received via mailing list)
Ok, I followed a tutorial online and was trying to get rewrite working
on my
server.  Well, everything works ok except for my Photo gallery which is
located in | <domain>/gallery |.  I'll include my current config for the
domain (wfto.cc and wfto.cc/gallery)
========================
server {
        listen 80;
        server_name www.waterfortheoppressed.com
waterfortheoppressed.com;

        rewrite ^ http://wfto.cc permanent;
}

server {
        listen   80;
        server_name www.wfto.cc  wfto.cc;


        access_log  /var/www/logs/wfto.cc.access.log;

        location = / {
                root   /var/www/wfto.cc;
                index  index.php index.html index.htm;
        }
        location / {
            root   /var/www/wfto.cc;
            index  index.php index.html;

            if (!-f $request_filename) {
                rewrite  ^(.*)$  /index.php?q=$1  last;
                break;
            }

            if (!-d $request_filename) {
                rewrite  ^(.*)$  /index.php?q=$1  last;
                break;
            }
        error_page  404  /index.php;

        # serve static files directly
        location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico)$ {
              access_log        off;
            expires           30d;
        }
        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
                root   /var/www/nginx-default;
        }

        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~ \.php$ {
                #proxy_pass   http://127.0.0.1;
        #}

        # pass the PHP scripts to FastCGI server listening on
127.0.0.1:9000
        #
        location ~ \.php$ {
                fastcgi_pass   127.0.0.1:9000;
                fastcgi_index  index.php;
                fastcgi_param  SCRIPT_FILENAME
/var/www/wfto.cc$fastcgi_script_name;
                include        fastcgi_params;
        }

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        location ~ /\.ht {
                deny  all;
        }
}
}
========================

Claude

--

Laurence J.
Peter<http://www.brainyquote.com/quotes/authors/l/lauren...
- "Originality is the fine art of remembering what you hear but
forgetting
where you heard it."
F5a6ed477b109fe6acc11a5a8f87e7e8?d=identicon&s=25 Michael Shadle (Guest)
on 2009-05-16 18:23
(Received via mailing list)
We've got drupal going with a simple try_files $uri $uri/ /path/to/
drupal/index.php?q=$uri&$args;

In nginx 0.7 of course.
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-05-16 18:59
(Received via mailing list)
On Sat, May 16, 2009 at 09:15:20AM -0700, Michael Shadle wrote:

> We've got drupal going with a simple try_files $uri $uri/ /path/to/
> drupal/index.php?q=$uri&$args;
>
> In nginx 0.7 of course.

0.6.36 too.
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-05-16 19:01
(Received via mailing list)
On Sat, May 16, 2009 at 06:09:41PM +0200, Claude Bing wrote:

> }
>                 index  index.php index.html index.htm;
>             if (!-d $request_filename) {
>                 rewrite  ^(.*)$  /index.php?q=$1  last;
>                 break;
>             }

+         }

>         location = /50x.html {
>         #
>         #
>         location ~ /\.ht {
>                 deny  all;
>         }
> }

- }

> }
> ========================

First, you should fix '}',
Second, use try_files instead of "if"s.
And third, your gallery probably is served as static files by

         location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico)$ {
8258b301dc8e73c0ce419c61c1e21891?d=identicon&s=25 Claude Bing (Guest)
on 2009-05-16 19:11
(Received via mailing list)
Well I should clarify about the gallery.  It's Gallery2, php-driven.

Where is the } that I should fix?

2009/5/16 Igor Sysoev <is@rambler-co.ru>

> >         server_name www.waterfortheoppressed.com
> >         access_log  /var/www/logs/wfto.cc.access.log;
> >                 rewrite  ^(.*)$  /index.php?q=$1  last;
> >         error_page  404  /index.php;
> >                 root   /var/www/nginx-default;
> >         #
> >         #
> First, you should fix '}',
>
--

Yogi Berra <http://www.brainyquote.com/quotes/authors/y/yogi_b...
-
"If you ask me anything I don't know, I'm not going to answer."
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-05-16 19:19
(Received via mailing list)
On Sat, May 16, 2009 at 07:04:43PM +0200, Claude Bing wrote:

> Well I should clarify about the gallery.  It's Gallery2, php-driven.

How does typical URL look ?

> Where is the } that I should fix?

I have marked the by "+" and "-":

+        }

         error_page  404  /index.php;

         location ~ /\.ht {
              deny  all;
         }
-}
 }
8258b301dc8e73c0ce419c61c1e21891?d=identicon&s=25 Claude Bing (Guest)
on 2009-05-16 19:23
(Received via mailing list)
K i will attempt to do this in a few minutes.  I'll get back to you
about
the gallery

2009/5/16 Igor Sysoev <is@rambler-co.ru>

> +        }
> >
> > > > ========================
> > > >         server_name www.wfto.cc  wfto.cc;
> > > >             index  index.php index.html;
> > >
> > > >         #
> > > >
> > > >
> > > > }
> > > Igor Sysoev
>
> --
> Игорь Сысоев
> http://sysoev.ru
>
>


--

Bill Cosby <http://www.brainyquote.com/quotes/authors/b/bill_c...
-
"Fatherhood is pretending the present you love most is soap-on-a-rope."
8258b301dc8e73c0ce419c61c1e21891?d=identicon&s=25 Claude Bing (Guest)
on 2009-05-16 20:07
(Received via mailing list)
Can I just exclude a directory from rewrite?

I suppose I can move the gallery to a subdomain.

2009/5/16 Claude Bing <tehbing@gmail.com>

>> How does typical URL look ?
>>              deny  all;
>> > > my
>> > > >
>> > > >         location = / {
>> > > >             }
>> > > >         # serve static files directly
>> > > >
>> > > >                 fastcgi_pass   127.0.0.1:9000;
>> > > >                 deny  all;
>> > > And third, your gallery probably is served as static files by
>> >
>>
>
>
> --
>
> Bill Cosby <http://www.brainyquote.com/quotes/authors/b/bill_c... - "Fatherhood 
is pretending the present you love most is soap-on-a-rope."




--

Yogi Berra <http://www.brainyquote.com/quotes/authors/y/yogi_b...
-
"If you ask me anything I don't know, I'm not going to answer."
Fe1cbce6b6b3fa8f72c740c570774ede?d=identicon&s=25 AMP Admin (Guest)
on 2009-05-16 20:20
(Received via mailing list)
I'm getting the "No input file specified." But only when there's no
trailing
slash or file specified.

This works:
http://www.example.com/dir/index.php
http://www.example.com/dir/

This does not work:
http://www.example.com/dir

Any ideas?
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-05-16 20:22
(Received via mailing list)
On Sat, May 16, 2009 at 07:58:21PM +0200, Claude Bing wrote:

> Can I just exclude a directory from rewrite?
> I suppose I can move the gallery to a subdomain.

You do not need rewrite at all:

    root   /var/www/wfto.cc;
    index  index.php index.html;

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

    location /gallery/ {
        try_files  $uri  $uri/  /index.php?q=$uri;
    }

    location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico)$ {
    }

    location ~ \.php$ {
        fastcgi_pass   127.0.0.1:9000;
        ...
    }
8258b301dc8e73c0ce419c61c1e21891?d=identicon&s=25 Claude Bing (Guest)
on 2009-05-16 20:25
(Received via mailing list)
Post your config file, specifically the section where you declare your
php
handler

On Sat, May 16, 2009 at 8:16 PM, AMP Admin <admin@ampprod.com> wrote:

>
> Any ideas?
>
>
>


--

Laurence J.
Peter<http://www.brainyquote.com/quotes/authors/l/lauren...
- "Originality is the fine art of remembering what you hear but
forgetting
where you heard it."
8258b301dc8e73c0ce419c61c1e21891?d=identicon&s=25 Claude Bing (Guest)
on 2009-05-16 20:26
(Received via mailing list)
It says to me when I use try_files  "Unknown directive: 'try_files'" and
I
don't know how to check the version number of nginx

2009/5/16 Igor Sysoev <is@rambler-co.ru>

>    location / {
>     location ~ \.php$ {
> > >
> > >> I have marked the by "+" and "-":
> > >>
> > >> > > > located in | <domain>/gallery |.  I'll include my current config
> > >> > > > }
> > >> > > >                 index  index.php index.html index.htm;
> > >> > > >             if (!-d $request_filename) {
> > >> > > >               access_log        off;
> > >> > > >         # proxy the PHP scripts to Apache listening on
> > >> > > >                 fastcgi_pass   127.0.0.1:9000;
> > >> > > >         location ~ /\.ht {
> > >> > > Second, use try_files instead of "if"s.
> > >> >
> > >> http://sysoev.ru
> >
> http://sysoev.ru/en/
>
>


--

Casey
Stengel<http://www.brainyquote.com/quotes/authors/c/casey_...
- "There comes a time in every man's life, and I've had plenty of
them."
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-05-16 20:37
(Received via mailing list)
On Sat, May 16, 2009 at 01:16:01PM -0500, AMP Admin wrote:

> Any ideas?
Could you show configuration ?
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-05-16 20:37
(Received via mailing list)
On Sat, May 16, 2009 at 08:19:50PM +0200, Claude Bing wrote:

> It says to me when I use try_files  "Unknown directive: 'try_files'" and I
> don't know how to check the version number of nginx

nginx -v
8258b301dc8e73c0ce419c61c1e21891?d=identicon&s=25 Claude Bing (Guest)
on 2009-05-16 20:42
(Received via mailing list)
*nginx version: nginx/0.6.32
*

2009/5/16 Igor Sysoev <is@rambler-co.ru>

> > > On Sat, May 16, 2009 at 07:58:21PM +0200, Claude Bing wrote:
> > >        try_files  $uri  $uri/  /index.php?q=$uri;
> > >        fastcgi_pass   127.0.0.1:9000;
> > > > > 2009/5/16 Igor Sysoev <is@rambler-co.ru>
> > > > >> I have marked the by "+" and "-":
> > > > >>
> > > which
> > > > >> > > waterfortheoppressed.com;
> > > > >> > > >
> > > > >> > > >                 break;
> > > > >> > > >
> > > > >> > > >                 root   /var/www/nginx-default;
> on
> > > > >> > > >         # deny access to .htaccess files, if Apache's
> > > > >> > >
> > > > >> > > --
> > > > >>  -
> > > > >
> > > > Yogi Berra <
> >
>
>


--

Yogi Berra <http://www.brainyquote.com/quotes/authors/y/yogi_b...
-
"If you ask me anything I don't know, I'm not going to answer."
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-05-16 20:52
(Received via mailing list)
On Sat, May 16, 2009 at 08:35:25PM +0200, Claude Bing wrote:

> *nginx version: nginx/0.6.32
> *

You may upgrade to 0.6.36 or use

   location / {
       error_page  404 = /index.php?q=$uri;
       log_not_found  off;
   }

on 0.6.32 instead of

   location / {
       try_files  $uri  $uri/  /index.php?q=$uri;
   }
8258b301dc8e73c0ce419c61c1e21891?d=identicon&s=25 Claude Bing (Guest)
on 2009-05-16 21:02
(Received via mailing list)
And how would I go about replacing my current version with the newest
one?
I'm running Debian Lenny, so I just used apt-get install nginx (which I
know
would yield a slightly older version, but it was much easier at the
time).
Would I just download, compile, and install the source over the current
one?

2009/5/16 Igor Sysoev <is@rambler-co.ru>

>   }
> > >
> > > > >
> > > > >    }
> > > > >         ...
> > > > > > > 2009/5/16 Igor Sysoev <is@rambler-co.ru>
> > > > > > >> I have marked the by "+" and "-":
> > > > > > >>
> > > gallery
> > > > > > >> > > >         listen 80;
> > > > > > >> > > >
> > > > > > >> > > >             if (!-f $request_filename) {
> > > > > > >> > >
> > > > > > >> > > >         error_page   500 502 503 504  /50x.html;
> > > > > > >> > > >
> > > > > > >> > > >                 include        fastcgi_params;
> > > > > > >> > > > }
> > > > > > >> > >
> > > > > > >> > --
> > > > > > >>
> > > > > >
> > > > > Igor Sysoev
> > > > them."
> > Yogi Berra <http://www.brainyquote.com/quotes/authors/y/yogi_b...
>  -
> > "If you ask me anything I don't know, I'm not going to answer."
>
> --
> Igor Sysoev
> http://sysoev.ru/en/
>
>


--

Laurence J.
Peter<http://www.brainyquote.com/quotes/authors/l/lauren...
- "Originality is the fine art of remembering what you hear but
forgetting
where you heard it."
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-05-16 21:23
(Received via mailing list)
On Sat, May 16, 2009 at 08:54:02PM +0200, Claude Bing wrote:

> And how would I go about replacing my current version with the newest one?
> I'm running Debian Lenny, so I just used apt-get install nginx (which I know
> would yield a slightly older version, but it was much easier at the time).
> Would I just download, compile, and install the source over the current one?

You may build nginx without package manager, but note, that default
nginx installation paths differ from Debian ones: you should use
something
like this:

./configure --prefix=/usr --with-conf-path=/etc/nginx/nginx.conf ...
etc.
8258b301dc8e73c0ce419c61c1e21891?d=identicon&s=25 Claude Bing (Guest)
on 2009-05-16 21:26
(Received via mailing list)
Ok.  Until I get this working, I'm re-enabling apache2 (sigh).  I will
work
on this asap.

2009/5/16 Igor Sysoev <is@rambler-co.ru>

>
> > > > *nginx version: nginx/0.6.32
> > >
> > > and
> > > > > > > > I suppose I can move the gallery to a subdomain.
> > > > > > >    location /gallery/ {
> > > > > > >
> > > > > > > > >
> > > > > > > > >> I have marked the by "+" and "-":
> > > > > > > > >>
> > > > > > > > >> > > > server.  Well, everything works ok except for my
> > > > > > > > >> > > > ========================
> > > > > > > > >> > > >         server_name www.wfto.cc  wfto.cc;
> > > > > > > > >> > > >         location / {
> > > > > > > > >> > > >                 rewrite  ^(.*)$  /index.php?q=$1
> ^.+.(jpg|jpeg|gif|css|png|js|ico)$ {
> > > > > > > > >> > > >         }
> > > listening
> > > > > > > > >> > > >
> > > > > > > > >> > >
> > > > > > > > >> > >
> > > > > > > > >> >
> > > > > > > > >> http://sysoev.ru
> > > > > > > >
> > > > > > >
> > > > > http://www.brainyquote.com/quotes/authors/c/casey_...
> > > > --
> > >
> --
> Igor Sysoev
> http://sysoev.ru/en/
>
>


--

Bill Cosby <http://www.brainyquote.com/quotes/authors/b/bill_c...
-
"Fatherhood is pretending the present you love most is soap-on-a-rope."
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-05-16 21:57
(Received via mailing list)
On Sat, May 16, 2009 at 09:20:31PM +0200, Claude Bing wrote:

> Ok.  Until I get this working, I'm re-enabling apache2 (sigh).  I will work
> on this asap.

You may stay with 0.6.32 using

   location / {
       error_page  404 = /index.php?q=$uri;
       log_not_found  off;
   }
F5a6ed477b109fe6acc11a5a8f87e7e8?d=identicon&s=25 Michael Shadle (Guest)
on 2009-05-16 22:58
(Received via mailing list)
I will say I did notice the behavior for Drupal and possibly other
apps that require GET parameters. I've noted it in a blog post:

http://michaelshadle.com/2009/05/15/dont-forget-the-args/

2009/5/16 Igor Sysoev <is@rambler-co.ru>:
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-05-17 08:01
(Received via mailing list)
On Sat, May 16, 2009 at 01:46:06PM -0700, Michael Shadle wrote:

> I will say I did notice the behavior for Drupal and possibly other
> apps that require GET parameters. I've noted it in a blog post:
>
> http://michaelshadle.com/2009/05/15/dont-forget-the-args/

Does Drupal understand

try_files $uri $uri/ /foo/index.php?u=$irequest_uri;

instead of

try_files $uri $uri/ /foo/index.php?u=$uri&$args;

?
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-05-17 08:03
(Received via mailing list)
On Sun, May 17, 2009 at 09:47:32AM +0400, Igor Sysoev wrote:

> On Sat, May 16, 2009 at 01:46:06PM -0700, Michael Shadle wrote:
>
> > I will say I did notice the behavior for Drupal and possibly other
> > apps that require GET parameters. I've noted it in a blog post:
> >
> > http://michaelshadle.com/2009/05/15/dont-forget-the-args/
>
> Does Drupal understand
>
> try_files $uri $uri/ /foo/index.php?u=$irequest_uri;

- try_files $uri $uri/ /foo/index.php?u=$irequest_uri;
+ try_files $uri $uri/ /foo/index.php?u=$request_uri;
460b2cbf71a0a21a8f72b8c31f20ebba?d=identicon&s=25 Hendry Lee (Guest)
on 2009-05-17 09:51
(Received via mailing list)
> - try_files $uri $uri/ /foo/index.php?u=$irequest_uri;
> + try_files $uri $uri/ /foo/index.php?u=$request_uri;

This doesn't work. With q or u variables. I tried it on an installation
of
Drupal with clean url. The request failed during an AJAX request.

index.php?q=$uri&$args works though.

Notice it's 'q=' not 'u='

-Hendry
Fe1cbce6b6b3fa8f72c740c570774ede?d=identicon&s=25 AMP Admin (Guest)
on 2009-05-17 13:41
(Received via mailing list)
I figured it out.  It was the way index was specified.
Fe1cbce6b6b3fa8f72c740c570774ede?d=identicon&s=25 AMP Admin (Guest)
on 2009-05-19 19:08
(Received via mailing list)
I'm on 0.6.35... is this the suggested version to be running?
2e321cc0efe9422d37165e922298494e?d=identicon&s=25 Cliff Wells (Guest)
on 2009-05-19 19:12
(Received via mailing list)
On Tue, 2009-05-19 at 12:00 -0500, AMP Admin wrote:
> I'm on 0.6.35... is this the suggested version to be running?

Depends on who you ask.   Some prefer the stable series, others (like
me) prefer the development branch.

Cliff
F5a6ed477b109fe6acc11a5a8f87e7e8?d=identicon&s=25 Michael Shadle (Guest)
on 2009-05-19 19:25
(Received via mailing list)
+! for 0.7.x

been running it since i started, no complaints.
2ed442571c411e079086bf64a5909d7b?d=identicon&s=25 Kon Wilms (Guest)
on 2009-05-19 20:13
(Received via mailing list)
No problems here either, and I've been upgrading all our production
servers to the 0.7.x versions. Of course, I wait a few days and watch
the mailing list for any bugreports :)
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-05-20 10:59
(Received via mailing list)
On Tue, May 19, 2009 at 12:00:52PM -0500, AMP Admin wrote:

> I'm on 0.6.35... is this the suggested version to be running?

I'm going to branch 0.8 development version and mark 0.7 as stable on
this or the next week.
2974d09ac2541e892966b762aad84943?d=identicon&s=25 Jim Ohlstein (Guest)
on 2009-05-20 13:18
(Received via mailing list)
The "development" branch has more frequent changes, hence it's referred
to as such.

The "stable" branch has fewer version releases, hence it is referred to
as such.

New features are added to the development branch, and sometimes ported
to the stable branch, sometimes not.

There are many large sites running the development branch, and quite a
few running the stable branch, and still a fair number running a legacy
version (0.5.x or perhaps earlier).

There are bugs in all of them (probably), as bug fixes are often part of
new releases in both the stable and development branches.

I always run the latest development release on the forum, currently
0.7.58.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,2197,2202#msg-2202
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-05-20 14:40
(Received via mailing list)
On Sun, May 17, 2009 at 02:43:08PM +0700, Hendry Lee wrote:

> > - try_files $uri $uri/ /foo/index.php?u=$irequest_uri;
> > + try_files $uri $uri/ /foo/index.php?u=$request_uri;
>
> This doesn't work. With q or u variables. I tried it on an installation of
> Drupal with clean url. The request failed during an AJAX request.
>
> index.php?q=$uri&$args works though.
>
> Notice it's 'q=' not 'u='

So, just to make clear: this

 try_files $uri $uri/ /foo/index.php?q=$request_uri;

does not work, but this

 try_files $uri $uri/ /foo/index.php?q=$uri&$args;

works.

How does Drupal go with zero $args ? I.e., /foo/index.php?$uri& ?
460b2cbf71a0a21a8f72b8c31f20ebba?d=identicon&s=25 Hendry Lee (Guest)
on 2009-05-20 15:33
(Received via mailing list)
> So, just to make clear: this
>
>  try_files $uri $uri/ /foo/index.php?q=$request_uri;
>
> does not work, but this
>
>  try_files $uri $uri/ /foo/index.php?q=$uri&$args;
>
> works.

Correct.

> How does Drupal go with zero $args ? I.e., /foo/index.php?$uri& ?

Failed too, as reported by someone earlier. $args is crucial in
try_files
for Drupal to work. This is a sample of url that generated an error.

Http://example.com/request/ajax/handle?operation=v...
%2Fgoogle.com%2F

When the PHP code checked the 'operation' variable, as in

if ($_REQUEST['operation']), it returned false.

With try_files $uri $uri/ /foo/index.php?q=$request_uri; it acts exactly
like my previous rewrite line.

if (!-e $request_filename) {
  rewrite ^/(.*)$ /index.php?q=$1 last;
  break;
}
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-05-20 15:39
(Received via mailing list)
On Wed, May 20, 2009 at 08:22:09PM +0700, Hendry Lee wrote:

> Correct.
>
> > How does Drupal go with zero $args ? I.e., /foo/index.php?$uri& ?
>
> Failed too, as reported by someone earlier. $args is crucial in try_files
> for Drupal to work. This is a sample of url that generated an error.

No, I meant how does Drupal go with trailing "&", if an original request
has no query string at all, say

/some/page.html

will be //foo/index.php?q=/some/page.html&
F5a6ed477b109fe6acc11a5a8f87e7e8?d=identicon&s=25 Michael Shadle (Guest)
on 2009-05-20 18:50
(Received via mailing list)
2009/5/20 Igor Sysoev <is@rambler-co.ru>:

> No, I meant how does Drupal go with trailing "&", if an original request
> has no query string at all, say
>
> /some/page.html
>
> will be //foo/index.php?q=/some/page.html&

I think this assumes Drupal is running with friendly URLs enabled,
which are extensionless, and also, the PHP script will see that as a
single parameter still, just 'q'

Since the slug /some/page.html is 'q', the & will be ignored as it is
a standard query string.

I think WordPress might do it slightly differently in how it parses
the URI, which is why it worked without $args (at least it appeared to
for a long time for me) - Drupal apparently needs the args passed to
it, whereas WordPress probably grabs the URI from another source (and
actually you might be able to pass nothing to the index.php and it
handles it from PATH_INFO. I think.)
460b2cbf71a0a21a8f72b8c31f20ebba?d=identicon&s=25 Hendry Lee (Guest)
on 2009-05-20 19:23
(Received via mailing list)
> No, I meant how does Drupal go with trailing "&", if an original request
> has no query string at all, say
>
> /some/page.html
>
> will be //foo/index.php?q=/some/page.html&
>

Tested that. Everything works fine. Just that I can't have parameters in
the
URL. For that I need to add $args.

Drupal clean url doesn't have extension, but I tried /submit, /node/1,
and
other longer urls, they all work fine.

-Hendry
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-05-20 19:31
(Received via mailing list)
On Wed, May 20, 2009 at 09:43:45AM -0700, Michael Shadle wrote:

> which are extensionless, and also, the PHP script will see that as a
> handles it from PATH_INFO. I think.)
Probably WordPress gets URI from REQUEST_URI.
F5a6ed477b109fe6acc11a5a8f87e7e8?d=identicon&s=25 Michael Shadle (Guest)
on 2009-05-20 21:06
(Received via mailing list)
2009/5/20 Igor Sysoev <is@rambler-co.ru>:

> Probably WordPress gets URI from REQUEST_URI.

Yeah, WordPress handles it a little bit better, and accepts multiple
styles of input and figures it out. Drupal is a bit more strict.

Both work fine with $args, but Drupal seems to require $args.
This topic is locked and can not be replied to.