我一直在尝试从我/wp-admin/admin.php?page=for_buyers to wp-admin/for-buyers/
的wordpress wp-admin仪表板中重定向网址。
有没有办法正确地做到这一点?我已尝试修改我的.htaccess
文件,如下所示,但它不起作用。
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteRule ^wp-admin/for-buyers/$ /wp-admin/admin.php?page=for_buyers
</IfModule>
# END WordPress
更新:我已经能够做到,但它现在导致重定向循环。
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^/wp-admin/admin.php?page=for_buyers wp-admin/for-buyers/$
</IfModule>