어떤 영혼이 나를 도울 수 있는지 궁금합니다.htaccess redirect - wordpress code conflict
저는 'wp'라는 하위 디렉토리에 새로운 WordPress 사이트를 만들었습니다. 모든 것을 이동하는 것보다 (나는 완전히 이해하지 못한다.) Id는 메인 페이지를 단순히 http://www.example.com
을 가리키고 http://www.example.com/wp/
을 가리 키도록하고 모든 페이지가 그 서브 디렉토리 내에서로드되도록/wp /를 주소 행에 넣는다. . 매우 도움이되고, 말해되지 않습니다
# Justhost.com
# .htaccess main domain to subdirectory redirect
# Copy and paste the following code into the .htaccess file
# in the public_html folder of your hosting account
# make the changes to the file according to the instructions.
# Do not change this line.
RewriteEngine on
# Change example.com to be your main domain.
RewriteCond %{HTTP_HOST} ^(www.)?example.com
$
# Change 'subdirectory' to be the directory you will use for your main domain.
RewriteCond %{REQUEST_URI} !^/wp/
# Don't change these line.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Change 'subdirectory' to be the directory you will use for your main domain.
RewriteRule ^(.*)$ /wp/$1
# Change example.com to be your main domain again.
# Change 'subdirectory' to be the directory you will use for your main domain
# followed by/then the main file for your site, index.php, index.html, etc.
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
RewriteRule ^(/)?$ wp/index.php [L]
그러나이 작동하지 않습니다 내 웹 호스트 : 나는 이것을 .htacess 파일로 리디렉션 코드를 추가 한 내 웹 호스트의 지시 사항에 따라
WordPress에 의해 생성 된 일부 기존 코드가 충돌합니다. 나는 영구 링크를 사용하고
DirectoryIndex index.html index.shtml index.xhtml index.wml index.perl index.pl index.plx index.ppl index.cgi index.jsp index.js index.jp index.php4 index.php3 index.php index.phtml index.htm home.htm default.htm index.fcgi default.html
# -FrontPage-
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName zsr-art.org.uk
AuthUserFile /home/zsrarto1/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/zsrarto1/public_html/_vti_pvt/service.grp
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /index.php/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php/index.php [L]
</IfModule>
, 나는이 문제의 원인인지 궁금 :이 htaccess로 파일의 기존 코드입니다. 누군가가 갈등이있는 곳과 문제를 해결하는 방법에 대해 조언 해 주실 수 있습니까?
에 의해이 부분을
교체 {HTTP_HOST}^(WWW.)? example.com, 당신은에 example.com을 변경 않았다 당신의 도메인 이름? –
예, example.com을 내 도메인 이름으로 변경했습니다. 하지만, 그게 작동하지 않습니다 –
당신의 문제가 이미 해결 된 것 같아서 지금보고 있지 않습니다! –