我所有的个人 wordpress 页面都重定向到 xampp 默认页面

Posted

技术标签:

【中文标题】我所有的个人 wordpress 页面都重定向到 xampp 默认页面【英文标题】:all my individual wordpress pages are redirecting to xampp default page 【发布时间】:2015-06-26 09:10:22 【问题描述】:

我只是试图访问单个 wordpress 页面,例如关于、成员登录、注册等,对于任何单个页面,我都会被重定向到 localhosts(在本例中为 xampp)主页。这是我的日志文件:

::1 - - [19/Apr/2015:11:50:25 -0700] "GET /localpressjuicery/wp-includes/js/tinymce/skins/wordpress/wp-content.css?ver=4.1.1&wp-mce-4107-20150118 HTTP/1.1" 304 - "http://localhost/localpressjuicery/wp-admin/post.php?post=2&action=edit" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0"

::1 - - [19/Apr/2015:11:50:25 -0700] "POST /localpressjuicery/wp-admin/admin-ajax.php HTTP/1.1" 200 4360 "http://localhost/localpressjuicery/wp-admin/post.php?post=2&action=edit" "Mozilla /5.0 (Windows NT 6.1; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0" ::1 - - [19/Apr/2015:11:50:37 -0700] "POST /localpressjuicery/wp-admin/admin-ajax.php HTTP/1.1" 200 47 "http://localhost/localpressjuicery/wp-admin/edit.php?post_type=page" "Mozilla/5.0 ( Windows NT 6.1;WOW64;rv:37.0) Gecko/20100101 Firefox/37.0" ::1 - - [19/Apr/2015:11:50:40 -0700] "POST /localpressjuicery/wp-admin/admin-ajax.php HTTP/1.1" 200 98 "http://localhost/localpressjuicery/wp-admin/post.php?post=2&action=edit" "Mozilla/5.0 ( Windows NT 6.1;WOW64;rv:37.0) Gecko/20100101 Firefox/37.0" ::1 - - [19/Apr/2015:11:52:37 -0700] "POST /localpressjuicery/wp-admin/admin-ajax.php HTTP/1.1" 200 47 "http://localhost/localpressjuicery/wp-admin/edit.php?post_type=page" "Mozilla/5.0 ( Windows NT 6.1;WOW64;rv:37.0) Gecko/20100101 Firefox/37.0" ::1 - - [19/Apr/2015:11:52:40 -0700] "POST /localpressjuicery/wp-admin/admin-ajax.php HTTP/1.1" 200 98 "http://localhost/localpressjuicery/wp-admin/post.php?post=2&action=edit" "Mozilla/5.0 ( Windows NT 6.1;WOW64;rv:37.0) Gecko/20100101 Firefox/37.0" ::1 - - [19/Apr/2015:11:54:37 -0700] "POST /localpressjuicery/wp-admin/admin-ajax.php HTTP/1.1" 200 47 "http://localhost/localpressjuicery/wp-admin/edit.php?post_type=page" "Mozilla/5.0 ( Windows NT 6.1;WOW64;rv:37.0) Gecko/20100101 Firefox/37.0" ::1 - - [19/Apr/2015:11:54:40 -0700] "POST /localpressjuicery/wp-admin/admin-ajax.php HTTP/1.1" 200 98 "http://localhost/localpressjuicery/wp-admin/post.php?post=2&action=edit" "Mozilla/5.0 ( Windows NT 6.1;WOW64;rv:37.0) Gecko/20100101 Firefox/37.0" ::1 - - [19/Apr/2015:11:56:37 -0700] "POST /localpressjuicery/wp-admin/admin-ajax.php HTTP/1.1" 200 47 "http://localhost/localpressjuicery/wp-admin/edit.php?post_type=page" "Mozilla/5.0 ( Windows NT 6.1;WOW64;rv:37.0) Gecko/20100101 Firefox/37.0" ::1 - - [19/Apr/2015:11:56:40 -0700] "POST /localpressjuicery/wp-admin/admin-ajax.php HTTP/1.1" 200 135 "http://localhost/localpressjuicery/wp-admin/post.php?post=2&action=edit" "Mozilla/5.0 ( Windows NT 6.1;WOW64;rv:37.0) Gecko/20100101 Firefox/37.0" ::1 - - [19/Apr/2015:11:58:37 -0700] "POST /localpressjuicery/wp-admin/admin-ajax.php HTTP/1.1" 200 47 "http://localhost/localpressjuicery/wp-admin/edit.php?post_type=page" "Mozilla/5.0 ( Windows NT 6.1;WOW64;rv:37.0) Gecko/20100101 Firefox/37.0" ::1 - - [19/Apr/2015:11:58:40 -0700] "POST /localpressjuicery/wp-admin/admin-ajax.php HTTP/1.1" 200 98 "http://localhost/localpressjuicery/wp-admin/post.php?post=2&action=edit" "Mozilla/5.0 ( Windows NT 6.1;WOW64;rv:37.0) Gecko/20100101 Firefox/37.0" ::1 - - [19/Apr/2015:12:00:40 -0700] "POST /localpressjuicery/wp-admin/admin-ajax.php HTTP/1.1" 200 98 "http://localhost/localpressjuicery/wp-admin/post.php?post=2&action=edit" "Mozilla/5.0 ( Windows NT 6.1;WOW64;rv:37.0) Gecko/20100101 Firefox/37.0" ::1 - - [19/Apr/2015:12:02:40 -0700] "POST /localpressjuicery/wp-admin/admin-ajax.php HTTP/1.1" 200 135 "http://localhost/localpressjuicery/wp-admin/post.php?post=2&action=edit" "Mozilla/5.0 ( Windows NT 6.1;WOW64;rv:37.0) Gecko/20100101 Firefox/37.0" ::1 - - [19/Apr/2015:12:04:40 -0700] "POST /localpressjuicery/wp-cron.php?doing_wp_cron=1429470280.8353641033172607421875 HTTP/1.0" 200 - "-" "WordPress/4.1.1; http://localhost/localpressjuicery" ::1 - - [19/Apr/2015:12:04:40 -0700] "POST /localpressjuicery/wp-admin/admin-ajax.php HTTP/1.1" 200 98 "http://localhost/localpressjuicery/wp-admin/post.php?post=2&action=edit" "Mozilla/5.0 ( Windows NT 6.1;WOW64;rv:37.0) Gecko/20100101 Firefox/37.0" ::1 - - [19/Apr/2015:12:06:40 -0700] "POST /localpressjuicery/wp-admin/admin-ajax.php HTTP/1.1" 200 98 "http://localhost/localpressjuicery/wp-admin/post.php?post=2&action=edit" "Mozilla/5.0 ( Windows NT 6.1;WOW64;rv:37.0) Gecko/20100101 Firefox/37.0" ::1 - - [19/Apr/2015:12:08:40 -0700] "POST /localpressjuicery/wp-admin/admin-ajax.php HTTP/1.1" 200 135 "http://localhost/localpressjuicery/wp-admin/post.php?post=2&action=edit" "Mozilla/5.0 ( Windows NT 6.1;WOW64;rv:37.0) Gecko/20100101 Firefox/37.0"

【问题讨论】:

至少显示一些日志。任何答案都只是您提供的信息的猜测。 从哪里获得日志? '\xampp\apache\logs\',可能吗? 我发布了日志文件 【参考方案1】:

您好像还没有更新您的 WordPress 常规设置。

登录 phpMyAdmin 并选择您的数据库。转到选项表并更新 siteurlhome 行。

您也可以通过登录 WordPress 管理区域并导航到常规设置来实现此目的。但是,我怀疑您是否可以访问您的管理区域。

【讨论】:

奇怪的是,我可以访问我的管理区域。那么我怎么能通过管理员这样做呢? nvm 我明白了...我在 wp 配置文件中有这些行:define('WP_HOME','localhost/localpressjuicery/') 和 define('WP_SITEURL','localhost/localpressjuicery/') 并更改像你说的数据库中的 url。 我可能会重定向。任何人,你应该去设置>>常规 好吧,你知道它仍然没有解决问题...我将上面的这两行注释掉了,但仍然没有解决问题。

以上是关于我所有的个人 wordpress 页面都重定向到 xampp 默认页面的主要内容,如果未能解决你的问题,请参考以下文章

所有 localhost http 链接都重定向到 https

Jira 链接每次都重定向到公司主网站

nginx中实现把所有http的请求都重定向到https

更新 XAMPP 后,现有的 Wordpress 网站会重定向到安装页面?

在 Hybris CCV2 中,页面被重定向到登录页面

Wordpress登录页面重定向到普通用户的Woocommerce我的帐户页面