WordPress与Drupal的Nginx配置rewrite重写规则示例


当前第2页 返回上一页

Drupal nginx重写规则
Drupal是使用PHP语言编写的开源内容管理框架,就是俗称的CMS,很多人在用Drupal搭建自己的博客,这里也来分享一下Drupal的nginx重写规则:

server {
 ...
location / {
 # This is cool because no php is touched for static content
 try_files $uri @rewrite;
 }
location @rewrite {
 # Some modules enforce no slash (/) at the end of the URL
 # Else this rewrite block wouldn't be needed (GlobalRedirect)
 rewrite ^/(.*)$ /index.php?q=$1;
 }
location ~ \.php$ {
 fastcgi_split_path_info ^(.+\.php)(/.+)$;
 #NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
 include fastcgi_params;
 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
 fastcgi_intercept_errors on;
 fastcgi_pass unix:/tmp/phpfpm.sock;
 }
...
 }

 
重启nginx


标签:WordPress

返回前面的内容

相关阅读 >>

wordpress实现文章支持和反对功能的方法

wordpress禁止特定用户修改密码的方法

wordpress数据库的基本构造及各表结构

详解wordpress中简码格式标签编写的基本方法

wordpress使用rss feed输出自定义文章类型内容的方法

wordpress制作网站的步骤

wordpress中使用wp-cron插件来设置定时任务

wordpress中加入google搜索功能的简单步骤讲解

教你如何用wordpress打造免费个人网站

wordpress 文章摘要功能实现代码

更多相关阅读请进入《wordpress》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...