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 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 LiBeAs的带隙等于0.997eV,计算阴离子的N和P
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 来真人,不要ai!matlab有关常微分方程的问题求解决,
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算