0

我在 linuxmint 上使用 Lamp 服务器,并在其上安装了 2 个 wordpress 平台,一个称为“bfsite”,另一个称为“titus”。我按照 WordPress 的建议修改了 .htacces 文件

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

这个是给 bfsite 的,我是为 /titus 平台修改的

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

和一个简单的重定向。

Redirect /index.php http://89.39.166.81/titus

如您所见,当我尝试继续时,我在线创建了我的本地主机,以便您查看发生了什么

http://89.39.166.81/titus/about

它会返回给我,http://localhost/titus/dev/如果你强制使用这条路径

http://89.39.166.81/titus/dev/

它带有 404 和找不到页面错误,但与“bfsite”wordpress 平台一起使用。

4

1 回答 1

0

由于您在 ubuntu 发行版下,您可以使用它

sudo a2enmod rewrite

-- 然后你可以从 wp 后端启用 postname。祝你好运!

于 2013-10-23T15:46:02.810 回答