dqkxo44488 2016-10-18 14:51
浏览 75

在子目录中使用wordpress错误

I have a non-wordpress site where i installed wordpress in a subdirectory

www.example.com/wordpress/

I have created an htaccess file in the wordpress folder (whre i have all its content)

    # BEGIN WordPress
   <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /wordpress/
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /wordpress/index.php [L]
    </IfModule>
    # END WordPress

And made this change in the index.php (inside wordpress folder)

<?php
/**
 * Front to the WordPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells WordPress to load the theme.
 *
 * @package WordPress
 */

/**
 * Tells WordPress to load the WordPress theme and output it.
 *
 * @var bool
 */
define('WP_USE_THEMES', true);

/** Loads the WordPress Environment and Template */
require( dirname( __FILE__ ) . './wordpress/wp-blog-header.php' );

The admin works ok but when try to visit the site it gives me an error 500. what am i missing?

Aclaration: I want to use wordpress in this url www.example.com/wordpress/ since i have other content in the root.

  • 写回答

4条回答 默认 最新

  • dongzhuange2625 2016-10-18 16:01
    关注

    Assuming you've updating your permalinks(or copied the htaccess file it provided you), take a look at your error logs, as an error 500 should produce an error in the logs.

    For Apache servers on Linux and Mac, the error logs can be found at: /var/log/apache2/error_log

    评论

报告相同问题?

悬赏问题

  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?