我想从
重写https://example.com/plugins/mediaplayer/site/_embed.php?u=57aa2050dcba22df
到
https://example.com/embed/57aa2050dcba22df
这就是我现在使用的:
RewriteEngine On
RewriteRule ^embed/?$ \/plugins\/mediaplayer\/site\/\_embed\.php [NC,L]
结果:
https://example.com/embed/?u=57aa2050dcba22df
如何重写?u = ?
此致
答案 0 :(得分:1)
假设你的哈希算法只涉及字母a-z和数字0-9 ..
RewriteBase /
RewriteRule ^embed/([a-z0-9]+)$ plugins/mediaplayer/site/_embed.php?u=$1