admin管理员组文章数量:1130349
I have a wordpress site(example) and I want to run another wordpress on the server. example's files are at /var/www/html/example directory on the server. I created a anotherSite Folder in /var/www/html/example/anotherSite and then copy all wordpress files in it. When I run , It connect to anotherSite but then redirect to .
/var/www/html/example/.htaccess are as follow:
########## 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\$ [NC]
RewriteRule ^(.*)$ /$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>
How can I fix redirect?
Note: example have a post with id 23023 and title anothersite-how-can-we-have.
I have a wordpress site(example) and I want to run another wordpress on the server. example's files are at /var/www/html/example directory on the server. I created a anotherSite Folder in /var/www/html/example/anotherSite and then copy all wordpress files in it. When I run http://example/anotherSite, It connect to anotherSite but then redirect to http://example/anothersite-how-can-we-have/23023.
/var/www/html/example/.htaccess are as follow:
########## 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\$ [NC]
RewriteRule ^(.*)$ https://www.example/$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>
How can I fix redirect?
Note: example have a post with id 23023 and title anothersite-how-can-we-have.
1 Answer
Reset to default 0I am not sure, but If you change folder of wordpress installation and when URL visited it still shows old URL, but you want it to show new URL. You should change address in wordpress settings.
Instructions: https://codex.wordpress/Changing_The_Site_URL
I have a wordpress site(example) and I want to run another wordpress on the server. example's files are at /var/www/html/example directory on the server. I created a anotherSite Folder in /var/www/html/example/anotherSite and then copy all wordpress files in it. When I run , It connect to anotherSite but then redirect to .
/var/www/html/example/.htaccess are as follow:
########## 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\$ [NC]
RewriteRule ^(.*)$ /$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>
How can I fix redirect?
Note: example have a post with id 23023 and title anothersite-how-can-we-have.
I have a wordpress site(example) and I want to run another wordpress on the server. example's files are at /var/www/html/example directory on the server. I created a anotherSite Folder in /var/www/html/example/anotherSite and then copy all wordpress files in it. When I run http://example/anotherSite, It connect to anotherSite but then redirect to http://example/anothersite-how-can-we-have/23023.
/var/www/html/example/.htaccess are as follow:
########## 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\$ [NC]
RewriteRule ^(.*)$ https://www.example/$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>
How can I fix redirect?
Note: example have a post with id 23023 and title anothersite-how-can-we-have.
1 Answer
Reset to default 0I am not sure, but If you change folder of wordpress installation and when URL visited it still shows old URL, but you want it to show new URL. You should change address in wordpress settings.
Instructions: https://codex.wordpress/Changing_The_Site_URL
本文标签: multisiteHow install wordpress in another wordpress folder
版权声明:本文标题:multisite - How install wordpress in another wordpress folder? 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749113558a2317810.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论