1.网络来源:http://www.shouce.ren/post/view/id/1529 server {      listen       80;     default_type text/plain;     root /var/www/html;     index index.php index.htm index.html; #隐藏index.php     location / {           if (!-e $request_filename) {         …
server { listen ; server_name ; root E:/www/wvtuan/; index index.php index.html; log_not_found off; access_log logs/bhunetworks-access.log; charset utf-; location ~ /\. { deny all; } location = /favicon.ico { } location = /robots.txt { } location / {…
只需要在server里面加上 if (!-e $request_filename) { rewrite ^/(.*)$ /index.php/$1 last; break; }…
server { listen 80; server_name localhost; root D:\workspace\PHP\Atromic; location / { index index.php index.html index.htm; if (-e $request_filename) { break; } if (!-e $request_filename) { rewrite ^/(.*)$ /index.php/$1 last; break; } } location ~ .…
server { listen ; #server_name localhost; server_name hhy.com;/**这里写自己的域名*/ #charset koi8-r; #access_log logs/host.access.log main; # root "F:/PHPstudy/PHPTutorial/WWW"; root "F:/PHPstudy/PHPTutorial/WWW/ShopMall"; location / { index i…
参考https://www.kancloud.cn/manual/thinkphp5/177576 thinkphp入口文件同目录下添加.把下面的内容保存为.htaccess文件 <IfModule mod_rewrite.c>Options +FollowSymlinks -MultiviewsRewriteEngine on RewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME} !-fRewriteRule ^…
tp官网已经写了 http://doc.thinkphp.cn/manual/hidden_index.html 不生效 重启nginx .问题依旧 kill掉nginx进程  再启动 贴段自己的配置: server { listen 80; server_name url; root /*/*/*; #include conf.d/ipFilter.conf; #access_log /data/logs/$server_name.access.log main; if ($http_user…
thinkphp config配置: 'URL_MODEL' => '2', //URL模式 nginx rewrite配置: location / { if (!-e $request_filename) { rewrite ^(.*)$ /index.php?s=$1 last; break; } } 如果你的ThinkPHP安装在二级目录,Nginx的伪静态方法设置如下,其中domainname是所在的目录名称 location /domainname/ { if (!-e $reques…
站点域名的配置:xxx.com.conf server { listen 80; root /www/web/xxx_com/public_html; server_name xxx.com; index index.html index.php index.htm; error_page 400 /errpage/400.html; error_page 403 /errpage/403.html; error_page 404 /errpage/404.html; error_page 50…
Yii2 配置 Nginx 伪静态 主要检查以下代码: location / { # Redirect everything that isn't a real file to index.php try_files $uri $uri/ /index.php?$args; } 完整代码: server { charset utf-8; client_max_body_size 128M; listen 80; ## listen for ipv4 #listen [::]:80 default…