网络技术

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;
}
}

34 thoughts on “NGINX环境下drupal程序的伪静态设置方法

  1. When I originally commented I appear to have clicked
    the -Notify me when new comments are added- checkbox and from now on every time a comment is added I get
    4 emails with the same comment. Is there a means you are
    able to remove me from that service? Thanks!

  2. You really make it seem so easy with your presentation but I
    find this matter to be really something which I think
    I would never understand. It seems too complicated and very broad for
    me. I’m looking forward for your next post, I’ll try to get the hang of
    it!

  3. I was wondering if you ever considered changing the page layout of your website?
    Its very well written; I love what youve got to say.

    But maybe you could a little more in the way of content so people could connect with it better.
    Youve got an awful lot of text for only having 1 or 2 images.
    Maybe you could space it out better?

  4. It is the best time to make some plans for the future and it’s time to be happy.

    I have read this post and if I could I desire to suggest you few interesting things or suggestions.
    Maybe you could write next articles referring to this article.
    I want to read even more things about it!

  5. Great weblog right here! Also your website loads up fast!

    What host are you the use of? Can I get your affiliate link to your host?

    I desire my web site loaded up as fast as yours lol

  6. I think what you wrote made a ton of sense. However, think about this,
    suppose you were to create a killer headline? I ain’t suggesting your content isn’t solid, but what if
    you added something that makes people desire more?

    I mean NGINX环境下drupal程序的伪静态设置方法 – 时间爱人-卢航网-卢航 is a little boring.
    You ought to look at Yahoo’s front page and see how they create post
    titles to grab people to click. You might add a video
    or a related pic or two to grab readers interested about everything’ve written.
    Just my opinion, it could make your blog a little livelier.

  7. Do you have a spam issue on this site; I also am a blogger, and I was curious about your situation; many of
    us have created some nice methods and we are looking to swap strategies with others, why not shoot me an e-mail if interested.

  8. Greetings! Quick question that’s completely off topic.
    Do you know how to make your site mobile friendly? My weblog looks
    weird when viewing from my iphone 4. I’m trying to find
    a theme or plugin that might be able to correct this problem.

    If you have any recommendations, please share. Thanks!

  9. 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

  10. 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!

  11. 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 =)

  12. 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.

发表评论

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

答案 : *
23 − 9 =


返回顶部