.htaccess配置重写url引擎

.htaccess 文件配置

Apache:

复制代码
<IfModule mod_rewrite.c>
  Options +FollowSymlinks -Indexes -Multiviews
  RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$ index.php?s=/$1 [QSA,PT,L]
</IfModule>

Nginx:

复制代码
location ~* (runtime|application)/{
   return 403;
}
location / {
   if (!-e $request_filename){
      rewrite  ^(.*)$  /index.php?s=$1  last;   break;
   }
}
相关推荐
web182854825121 小时前
nginx 部署前端vue项目
前端·vue.js·nginx
零星_AagT21 小时前
Apache-CC6链审计笔记
java·笔记·apache·代码审计
fajianchen1 天前
什么是HTTP/2协议?NGINX如何支持HTTP/2并提升网站性能?
nginx·http
m0_748248771 天前
在 Ubuntu 上安装 Nginx 的详细指南
nginx·ubuntu·postgresql
若云止水2 天前
Ubuntu 下 nginx-1.24.0 源码分析 - ngx_os_init 函数
运维·nginx
m0_512744642 天前
Nginx(详解以及如何使用)
运维·服务器·nginx
铁锅与大鹅2 天前
http+nginx
网络协议·nginx·http
s_fox_2 天前
Nginx Embedded Variables 嵌入式变量解析(4)
java·网络·nginx
致奋斗的我们2 天前
Nginx反向代理及负载均衡
linux·运维·mysql·nginx·负载均衡·shell·openeluer
花千树-0102 天前
Java中的自然语言处理(NLP)工具:Stanford NLP、Apache OpenNLP、DL4J
java·自然语言处理·nlp·aigc·apache