공유 웹 사이트에서 2 개의 웹 사이트를 호스팅하고 있습니다. /public_html/
에서
나는 example.com
를 개최하고 /public_html/example2/
에 나는 호스팅 한 example.com의 example2.com
하위 폴더에 두 번째 WordPress 인스턴스 설치 문제
.htaccess
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]
# 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>
# END WordPress
#Custom Error Pages
ErrorDocument 403 https://www.example.com/error-403/
.htaccess
# 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>
# END WordPress
#Custom Error Pages
ErrorDocument 403 http://www.example2.com/error-403/
내가 WA NT 하위 그것을 http://www.example2.com/ (SSL을하지 않는
- example.com 즉 WWW 버전과 별도로 웹 사이트 모두에 액세스 할 수 디렉토리)
는 참고 : 나는 워드 프레스 일반 설정에서 설정 site_url
및 home_url
주어진 URL 위에 있습니다. 내가 그래서 this answer을 읽은 후 https://www.example.com/example2/
에 저를 취하고있다 example2.com
에 액세스 할 때 내가 직면하고있어
문제
이고, 나는
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase/
RewriteRule ^index\.php$ - [L]
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# if request is not for the /example2/
RewriteCond %{REQUEST_URI} !^/example2/ [NC]
# otherwise forward it to index.php
RewriteRule . /index.php [L]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]
</IfModule>
# END WordPress
에 example.com
내 .htaccess
변경 이제 example2.com
에 액세스 할 수 있지만 퍼머 링크는 그렇지 않습니다. 그래서 그것을 재설정하려고 할 때 내 example2 .haccess
파일의 내용을 삭제하고 https://www.example.com/example2/
으로 리디렉션 중입니다.
아무도 나를 도와 줄 수 있습니까?
나는 또한 행운을 가지고 이것을 시도했다 Configuring WordPress .htaccess to view subfolders.
감사합니다,하지만 사촌이 지금은 https://www.example.com'로 리디렉션되고, 작동하지 않는 것 같다/example2 /'. –