首页 > 解决方案 > 将 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]

标签: regexapachemod-rewriteurl-rewriting

解决方案


推荐阅读