我想重定向用户
localhost/test/Mj4sD
至
localhost/test/short.php?url=Mj4sD
而 Mj4sd 是 5 个字母(小写、大写、数字)的模式。我目前的配置:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/test/[A-Za-z][0-9]{0,5}$ /test/short.php?url=$1
您必须将您的更改RewriteRule
为:
RewriteRule ^(\w+)$ ./short.php?url=$1
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句