wordpress 主页显示问题

昨晚安装完wordpress后,在登录页面输入用户名和密码,后可以正常登陆,但是尽然显示apache的目录,不过选择目录下的index.php可以进入wordpress管理后台。在后台发表blog,却无法进入blog主页,有点郁闷。

解决方法:

1,找到apache安装目录下的httpd.conf
修改
Options Indexes FollowSymLinks为
Options -Indexes


添加index.php
<IfModule dir_module>
    DirectoryIndex index.html index.php
</IfModule>


2,修改wordpress下wp-login.php
找到
if ( !is_wp_error($user) ) {
		// If the user can't edit posts, send them to their profile.
		if ( !$user->has_cap('edit_posts') && ( empty( $redirect_to ) || $redirect_to == 'wp-admin' || $redirect_to == admin_url() ) )
			$redirect_to = admin_url('profile.php');
		wp_safe_redirect($redirect_to);
		exit();
	}

将语句中的$redirect_to == 'wp-admin'修改为$redirect_to == 'wp-admin/index.php'

3,重启apache服务

4,ok,嘿嘿,有自己的博客站点了

猜你喜欢

转载自lrj2u.iteye.com/blog/1753126
今日推荐