我在子文件夹中安装了WP/cms
它在没有子文件夹的情况下实时运行。当我使用/%postname%/
作为permalink,我的网站出现404错误。支持我的服务器mod_rewrite
.
我的代码可湿性粉剂配置。php
define(\'WP_SITEURL\', \'http://www.sitename.de/cms\');
define(\'WP_HOME\', \'http://www.sitename.de\');
根部)。htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /cms/
RewriteRule ^index\\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /cms/index.php [L]
</IfModule>
指数。php
<?php
define(\'WP_USE_THEMES\', true);
require(\'./cms/wp-blog-header.php\');
?>
cms)。htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
指数。php
<?php
define(\'WP_USE_THEMES\', true);
require(\'./wp-blog-header.php\');
?>
感谢您的帮助