php - Htaccess隐藏url参数键
问题描述
目前我在 htaccess 中做了什么
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
#####exclude /admin88 folder####
RewriteCond %{REQUEST_URI} !^/admin88
#################
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /((?!admin88)[^.]+)\.php
RewriteRule ^/?(.*)\.php$ /$1 [NC,L,QSA,R=301]
在所有页面中隐藏 .php,但不包括运行良好的 /admin88 目录
接下来我需要从以下网址
www.example.com/page_name/?lang=en
or
www.example.com/?lang=en
根据我现有的 htaccess 从 url 中隐藏 ?lang
www.example.com/page_name/en
or
www.example.com/en
我试图改变我的 htaccess 但它搞砸了很多
解决方案
推荐阅读
- jwt - 解决 .NET Core API 的身份验证问题 JWT Bearer
- python - Python web3 获得最大持有者
- c# - C# 程序将数据保存到 Google FirestoreDB 在某些计算机上失败(StatusCode=Unavailable; grpc_status: 14)
- vb.net - 如何使用计时器每 3 秒更改一次图片框的内容
- flutter - Flutter _debugLifecycleState != _ElementLifecycle.defunct':不正确
- java - UML 中的特定数组类型?
- swift - 如何在后台使用 CoreData 获取数据?
- android - 第一次在应用程序中评估 ROOM 数据库时出现 java.lang.IllegalStateException
- javascript - 节点js。从硬盘安装 npm 包
- git - Git 功能在 VS Code、Windows 10 中不起作用