admin管理员组文章数量:1130349
I use wordpress 4.9.8. I want to close user access to site/wp-signup.php I added code in .htaccess
<Files wp-signup.php>
Order Allow,Deny
Deny from all
</Files>
When I go to site/wp-signup.php, I get error 403.It's good for me.
But if I follow the link /wp-signup and /wp-signup.ph and /wp-signup.p etc I get the following error:
This error is formed from a file - wp-includes/functions.php line 2722. How to display 403 error with any link /wp-signup ?
Thanks for help!
I use wordpress 4.9.8. I want to close user access to site/wp-signup.php I added code in .htaccess
<Files wp-signup.php>
Order Allow,Deny
Deny from all
</Files>
When I go to site/wp-signup.php, I get error 403.It's good for me.
But if I follow the link /wp-signup and /wp-signup.ph and /wp-signup.p etc I get the following error:
This error is formed from a file - wp-includes/functions.php line 2722. How to display 403 error with any link /wp-signup ?
Thanks for help!
Share Improve this question asked Nov 12, 2018 at 17:46 JhonnyMnemonikJhonnyMnemonik 132 bronze badges1 Answer
Reset to default 0The <Files> directive is used to target specific files on the filesystem, not URLs. To change this to target any URL that starts /wp-signup then use mod_rewrite instead. For example:
RewriteRule ^wp-signup - [F]
This must go at the top of your .htaccess file.
I use wordpress 4.9.8. I want to close user access to site/wp-signup.php I added code in .htaccess
<Files wp-signup.php>
Order Allow,Deny
Deny from all
</Files>
When I go to site/wp-signup.php, I get error 403.It's good for me.
But if I follow the link /wp-signup and /wp-signup.ph and /wp-signup.p etc I get the following error:
This error is formed from a file - wp-includes/functions.php line 2722. How to display 403 error with any link /wp-signup ?
Thanks for help!
I use wordpress 4.9.8. I want to close user access to site/wp-signup.php I added code in .htaccess
<Files wp-signup.php>
Order Allow,Deny
Deny from all
</Files>
When I go to site/wp-signup.php, I get error 403.It's good for me.
But if I follow the link /wp-signup and /wp-signup.ph and /wp-signup.p etc I get the following error:
This error is formed from a file - wp-includes/functions.php line 2722. How to display 403 error with any link /wp-signup ?
Thanks for help!
Share Improve this question asked Nov 12, 2018 at 17:46 JhonnyMnemonikJhonnyMnemonik 132 bronze badges1 Answer
Reset to default 0The <Files> directive is used to target specific files on the filesystem, not URLs. To change this to target any URL that starts /wp-signup then use mod_rewrite instead. For example:
RewriteRule ^wp-signup - [F]
This must go at the top of your .htaccess file.
本文标签: htaccessHow disable canonical redirect wpsignup
版权声明:本文标题:htaccess - How disable canonical redirect wp-signup 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749188557a2329801.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论