VPS侦探论坛

 找回密码
 注册
查看: 3298|回复: 5

lnmpa1.4-php7+drupal8 clean url怎么都设置不好

[复制链接]
发表于 2017-6-17 21:48:10 | 显示全部楼层 |阅读模式

军哥,您好!最近折腾死了,
lnmpa1.4-php7+drupal8  clean url怎么都设置不好,url中总是出现/index.php/。地址:www.zhubaopub.com

lnmpa是没有装 php-fpm对吧,
我换了lnmp,lamp都没问题,请了朋友也没搞好,还请赐教。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2017-6-18 11:19:45 | 显示全部楼层


没设置伪静态吧
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2017-6-18 12:22:17 | 显示全部楼层

已经设置过了
location / {
         if (!-e $request_filename) {
         rewrite  ^(.*)$  /index.php?s=$1  last;
          break;
        }
        }

不起作用。
装回 lnmp,设置下面就可以:
location / {
                index   index.php index.html;
                try_files @uri @rewrite;
      
        }


        location ~ ^/sites/.*/files/styles/ {
                try_files $uri @rewrite;
        }


        location @rewrite {
                rewrite ^ /index.php last;
        }
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2017-6-19 10:46:18 | 显示全部楼层



军哥,麻烦指点一下
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2017-6-19 13:08:35 | 显示全部楼层

回复 3# 的帖子


lnmpa和lamp下使用apache格式的伪静态 .htaccess 放网站根目录下

军哥运维代购:http://shop63846532.taobao.com/

 楼主| 发表于 2017-6-20 21:19:23 | 显示全部楼层

非常感谢军哥!!!一句话搞定n天的折腾与纠结!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-25 21:22 , Processed in 0.026387 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表