Home  >  Q&A  >  body text

Please provide a code to configure thinkphp pseudo-static in nginx?

ThinkPHP url rewrite under nginx Rewrite rules pseudo-static

迷茫迷茫2736 days ago708

reply all(1)I'll reply

  • 巴扎黑

    巴扎黑2017-05-16 17:17:53

    server {  
        location / {  
            index  index.htm index.html index.php;  
            try_files  $uri  /index.php$uri;  
        }  
        location ~ .+\.php($|/) {  
            root        /var/www/thinkphp;  
            fastcgi_pass   127.0.0.1:9000;  
            fastcgi_index  index.php;  
                
            fastcgi_split_path_info  ^(.+\.php)(/.*)$;  
            fastcgi_param  PATH_INFO $fastcgi_path_info;  
              
            include        fastcgi.conf;  
        }  
    }  

    reply
    0
  • Cancelreply