permalinks에서 하위 디렉토리에 WordPress를 설치하고 index.php를 제거하고 싶습니다. 서버가 IIS 6.0이며 다시 쓰기를 지원합니다..htaccesss RewriteCond % {REQUEST_FILENAME}! -d가 작동하지 않습니다.
웹 루트
--wp [워드 프레스 폴더]
웹 루트/htaccess로
RewriteCond %{HTTP_HOST} ^(www\.)?a.luckyet\.com$ [NC]
RewriteCond %{REQUEST_URI} !^/wp/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /wp/$1
RewriteCond %{HTTP_HOST} ^(www\.)?a.luckyet\.com$ [NC]
RewriteRule ^(/)?$ wp/
웹 루트/WP/htaccess로 : 내 웹 서버는 다음 디렉토리를 가지고
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f #1
RewriteCond %{REQUEST_FILENAME} !-d #2
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] #3
내가 방문 할 때 의미가 있습니다 a.luckyet.com 및 a.luckyet.com/hello-world.html 하지만 방문 할 때 작동하지 않습니다 a.luckyet.com/wp-login .PHP 또는 a.luckyet.com/wp-admin
3 번 작품 좋은,하지만 # 1과 # 2는 제대로 작동하지 않을 수 있습니다. 그럼 난 here을보고에 웹 루트/WP/htaccess로의 내용 변경 : 그것은 아직 적용되지 않습니다
RewriteEngine on
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
합니다. 누구든지 나를 도울 수 있습니까? 미리 감사드립니다!
업데이트 :
ISAPI_Rewrite 버전은 3.0입니다.
웹 루트의 모든 코드/htaccess로 :
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?a.luckyet\.com$ [NC]
RewriteCond %{REQUEST_URI} !^/wp/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /wp/$1
RewriteCond %{HTTP_HOST} ^(www\.)?a.luckyet\.com$ [NC]
RewriteRule ^(/)?$ wp/
웹 루트의 모든 코드/WP/htaccess로 :
RewriteEngine on
# For file-based wordpress content (i.e. theme), admin, etc.
RewriteRule wp-(.*) wp-$1 [L]
# For normal wordpress content, via index.php
RewriteRule ^/$ index.php [L]
RewriteCond %{REQUEST_FILENAME} !-f #1
RewriteCond %{REQUEST_FILENAME} !-d #2
RewriteRule (.*) index.php/$1 [L]
워드 프레스 고유 주소는 다음과 같습니다
/%postname%.html
따라서 Wordpress는 좋을 수 있습니다.
웹 루트/WP/에서 a.html 같은 실제 파일이 웹 루트처럼,이 경우는/WP는 a.html, 404 WordPress의/: 방문 http://a.luckyet.com/ 또는 http://a.luckyet.com/hello-world.html이
질문 할 때 미세 케이 방문시 오류가보고됩니다. http://a.luckyet.com/a.html,. 어떻게 해결할 수 있습니까?
'RewriteCond % {DOCUMENT_ROOT} % {REQUEST_URI}! -f' 또는'! -d'이어야합니다. 어떤 ISAPI_Rewrite 버전을 사용하고 있습니까? –
고마워,하지만 여전히 작동하지 않습니다. 또한 ISAPI_Rewrite 버전을 알지 못합니다. 구입 한 가상 호스트입니다. – zwee
나는이 문제를 해결하기 위해 어떤 방법으로 문제를 업데이트합니까? – zwee