2014-12-31 2 views

답변

1

먼저 WordPress에서 덮어 쓰기로 유명하기 때문에 .htaccess 파일에서 쓰기 권한을 제거하십시오. public_html 루트 디렉토리의 .htaccess에 다음 코드 행을 추가하십시오. 이 작업을 수행하기 전에 설정 >> 일반에서 사이트 URL을 변경하십시오. 당신의 워드 프레스 설정> 일반 설정에서 https://my.bluehost.com/cgi/help/347

+0

감사합니다. ham-sandwich, 무작위로 생성 된 하위 도메인에 대해이 작업을 수행하고 싶습니다. –

+0

안녕하세요 @AayQue - 네, 그렇습니다. 그러나이를 명시 적으로'.htaccess' 파일에 정의 할 필요가 있습니다. 예를 들어'RewriteCond % {REQUEST_URI}! ^/random/' –

-1

을 당신이 원하는대로에 사이트 주소 URL을 변경

# .htaccess main domain to subdirectory redirect 
# 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} !^/subdirectory/ 
# Don't change the following two lines. 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
# Change 'subdirectory' to be the directory you will use for your main domain. 
RewriteRule ^(.*)$ /subdirectory/$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 ^(/)?$ subdirectory/index.html [L] 

당신은 BlueHosts 웹 사이트에서 자세한 내용을보실 수 있습니다.

+0

아니요. 그것은 작동하지 않습니다! 사실 사이트 전체가 작동을 멈추게됩니다. S –

관련 문제