如何mod_rewrite"?u ="

时间:2016-10-13 04:14:26

标签: apache .htaccess mod-rewrite

我想从

重写
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 =

此致

1 个答案:

答案 0 :(得分:1)

假设你的哈希算法只涉及字母a-z和数字0-9 ..

RewriteBase /
RewriteRule ^embed/([a-z0-9]+)$ plugins/mediaplayer/site/_embed.php?u=$1