Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在wordpress中有以下重写规则:
add_rewrite_rule('members/(.+)/?$', 'index.php?pagename=members&username=$matches[1]','top');
这会重写 URL 地址中 www.mysite.com/members/ 之后的所有内容。
我的挑战是保留该功能但排除以下 URL 路径:www.mysite.com/members/info/。
有人可以帮我这样做吗?
只需在其他指令之前将其添加到 .htaccess 即可。
RewriteRule members/ - [L]