在我的域名上有一个WordPress登录页面之前:www.becowo.com
4月1日,我在现有域名上用我的新Symfony网站替换了这个登录页面。
因为,在尝试访问旧的WP管理员URL时,我可以看到日志中的错误(当然因为它们不再存在)。但谁/什么可以尝试访问这些网址?
我该如何清理?
以下是日志的摘录:
[2017-04-18 04:03:57] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "GET /wp-login.php"" at /xxxxx/var/cache/prod/classes.php line 2773 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): No route found for \"GET /wp-login.php\" at /xxxxx/var/cache/prod/classes.php:2773, Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException(code: 0): at /xxxxx/var/cache/prod/appProdUrlMatcher.php:888)"} []
[2017-04-18 04:03:58] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "GET /wp-admin" (from "https://www.becowo.com/wp-login.php")" at /xxxxx/var/cache/prod/classes.php line 2773 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): No route found for \"GET /wp-admin\" (from \"https://www.becowo.com/wp-login.php\") at /xxxxx/var/cache/prod/classes.php:2773, Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException(code: 0): at xxxxx/var/cache/prod/appProdUrlMatcher.php:888)"} []
谢谢!
答案 0 :(得分:0)
搜索引擎机器人,漏洞扫描程序等...会尝试访问您的旧wp-admin
网址,因为他们过去可能已经看过它了。
只需在301
.htaccess
RewriteEngine on
RewriteRule ^wp-admin/(.*)$ /$1 [R=301,NC,L]