regex - 将 url 重写为漂亮的 URL
问题描述
我需要用查询字符串将 url 重写为漂亮的 url。
漂亮的网址将是:
https://dev.agency.com/private
这需要重写为:
https://dev.agency.com/player/5d4d1ecb9d41f/?//private
尝试了不同的查询字符串条件匹配但没有任何成功
RewriteEngine On
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^([^/]+)/?$ http://dev.agency.com/?//$1 [L,P]
解决方案
推荐阅读
- powershell - How do i dynamically change file-names with Rename-Item?
- javascript - fs.readFileSync("./bank/"+client,'cp1251'); 正在抛出新的 ERR_INVALID_OPT_VALUE_ENCODING
- c# - 如何从 ObjectListView 中选定项目的特定列中获取数据?
- vba - 运行时错误 91,未设置对象,尝试自动下载电子邮件附件
- vb6 - 将 BLOB 保存到文档
- javascript - 在第一个结果中获取下拉列表的返回值 [object Object]。当我选择一个选项并工作时,它会改变。如何修复默认结果
- laravel - 部署 laravel + vuejs 到共享主机
- java - 使用 PreparedStatement 在 where 子句中传递字符串
- mysql - 加入两个集合并在 MongoDB 中更新
- c - libxml2 的解析问题:命名空间错误