原文:http://lrj2u.iteye.com/blog/1753126
昨晚安裝完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,嘿嘿,有自己的博客站點了