我有一个wordpress 现场(example.com) 我想在服务器上运行另一个wordpress。example.com\'s文件位于/var/www/html/example.com 服务器上的目录。我创建了一个anotherSite 文件夹位于/var/www/html/example.com/anotherSite 然后复制其中的所有wordpress文件。当我跑步时http://example.com/anotherSite, 它连接到anotherSite 然后重定向到http://example.com/anothersite-how-can-we-have/23023.
/var/www/html/example.com/.htaccess 具体如下:
########## REDIRECT SSL
RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
####### REDIRECT WWW
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example\\.com$ [NC]
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]
RedirectMatch 301 /MYFolder(.*) /MYFolder/$1
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
如何修复重定向?
Note: example.com 有一个id为的帖子23023 和标题anothersite-how-can-we-have.