NGINX环境下drupal程序的伪静态设置方法

安装了drupal之后,想去看看“帮助”,在website/admin/help页面。但是点了一下404了如上图。
上图的admin/*都无法访问如下图,但是我觉得可以用website/index.php/admin/help,实测可用,但是还是设置一下伪静态吧。

伪静态规则如下,再次实测可用

location ~ ^.*/files\/styles\/.*$ {
access_log off;
expires 45d;
error_page 404 @drupal;
}

location @drupal {
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?q=$1 last;
}
}
# Drupal Rewrite
location / {
root /path/to/drupal;
index index.php index.html;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?q=$1 last;
}
}

NGINX环境下drupal程序的伪静态设置方法》有17个想法

  1. Its like you learn my thoughts! You appear to understand a lot approximately
    this, such as you wrote the e book in it or something.
    I feel that you just can do with a few % to force the message home a little bit, but instead of that, that is great blog.
    A great read. I’ll definitely be back.

  2. Great work! This is the kind of information that are supposed to be
    shared around the web. Disgrace on the search engines for no longer positioning this put up upper!

    Come on over and seek advice from my web site .
    Thanks =)

  3. Woah! I’m really digging the template/theme of this blog. It’s simple, yet effective.
    A lot of times it’s challenging to get that “perfect balance” between user friendliness and visual
    appeal. I must say you’ve done a amazing job with this.
    Additionally, the blog loads very fast for me on Opera.
    Outstanding Blog!

  4. Hello just wanted to give you a quick heads up. The words
    in your content seem to be running off the screen in Chrome.
    I’m not sure if this is a formatting issue or something to do with web browser compatibility but
    I thought I’d post to let you know. The layout look
    great though! Hope you get the problem resolved soon. Cheers

发表评论

电子邮件地址不会被公开。 必填项已用*标注

答案 : *
30 + 24 =