发现一个免费主机,伪静态咋设置不对,

tetepay  (UID: 2470) [复制链接]
帖子链接已复制到剪贴板
帖子已经有人评论啦,不支持删除!

1149 7

发现一个免费主机,伪静态咋设置不对

发现一个免费主机,伪静态咋设置不对,

 

9000多个源码网站:https://www.httple.net
已有评论 ( 7 )
  • 头像
    V crll (UID: 92) 特别鸣谢
    1楼
    location / {
    if (!-e $request_filename) {
    rewrite ^(.*)$ /index.php?s=$1 last;
    break;
    }
    }
    
    location / {
        if (-f $request_filename/index.html){
            rewrite (.*) $1/index.html break;
        }
        if (-f $request_filename/index.php){
            rewrite (.*) $1/index.php;
        }
        if (!-f $request_filename){
            rewrite (.*) /index.php;
        }
    }
    
    location / {
        if (!-e $request_filename)
        {
            rewrite ^/(.*)$ /index.php last;
        }
    }
    
  • 头像
    人妻传媒_世俗 (UID: 78)
    (x.nn.ma )
    2楼

    魔王牛逼

  • 头像
    tetepay (UID: 2470)
    (9000多个源码网站:https://www.httple.net)
    3楼
    魔王 location / { if (!-e $request_filename) { rewrite ^(.*)$ /index.php?s=$1 last; break; } } lo ...
    <IfModule mod_rewrite.c>
    RewriteEngine on
    
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php/$1 [QSA,L]
    </IfModule> 

    使用这个伪静态,不支持Apache  location / {

    只允许break、if、return、rewrite、set这五个指令

    用AI转换不行

  • 头像
    黑子 (UID: 983)
    4楼

    哪家的我也想要表情

  • 头像
    tetepay (UID: 2470)
    (9000多个源码网站:https://www.httple.net)
    5楼
    [引用消息已被删除]

    nginx服务器,不能像宝塔一样使用location  /  {

     

    只允许break、if、return、rewrite、set这五个指令

  • 头像
    锅包肉 (UID: 715)
    6楼

    什么主机啊

  • 头像
    阿城守候 (UID: 2785)
    7楼

    你告诉我哪家的,我去帮你试试。表情

域名市场
   域名载入中...
创建新帖
自助推广购买广告位
确认删除
确定要删除这篇帖子吗?删除后将无法恢复。
删除成功
帖子已成功删除,页面将自动刷新。
删除失败
删除帖子时发生错误,请稍后再试。