简体   繁体   中英

PHP: Excluding URL Path from URL Rewrite Rules

I have the following rewrite rule in wordpress:

add_rewrite_rule('members/(.+)/?$', 'index.php?pagename=members&username=$matches[1]','top');

This rewrites everything after www.mysite.com/members/ in the URL address.

My challenge is to keep that functionality but exclude the following URL path: www.mysite.com/members/info/.

Can anybody please help me do so?

只需在其他指令之前将其添加到.htaccess中即可。

RewriteRule members/ - [L]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM