htaccess 관련 질문입니다.. 채택완료
nanati
10년 전
조회 3,478
제가 어느부분을 잘못 썼는지 좀 봐주실 분 계시면 고쳐주세요 ㅠ ㅠ
</div><div>AddType application/x-httpd-php .htm .html</div><div>
</div><div>#HTTPSへリダイレクト</div><div>RewriteEngine On</div><div>RewriteBase /</div><div>RewriteRule ^join/form\.html$ https://<a href="<a href="http://www.test.or.jp/join/form.html" target="_blank" rel="noopener noreferrer">http://www.test.or.jp/join/form.html</a>">www.test.or.jp/join/form.html</a> [R=301,L]</div><div>RewriteRule ^site/contact\.html$ https://<a href="<a href="http://www.test.or.jp/site/contact.html" target="_blank" rel="noopener noreferrer">http://www.test.or.jp/site/contact.html</a>">www.test.or.jp/site/contact.html</a> [R=301,L]</div><div>
</div><div>#404 not found</div><div>ErrorDocument 404 <a href="<a href="http://www.test.or.jp/site/404.html" target="_blank" rel="noopener noreferrer">http://www.test.or.jp/site/404.html</a>"><a href="http://www.test.or.jp/site/404.html" target="_blank" rel="noopener noreferrer">http://www.test.or.jp/site/404.html</a></a></div><div>
</div><div>#wwwの有り無し統一</div><div>RewriteCond %{HTTP_HOST} ^(test\.or\.jp)(:80)? [NC]</div><div>RewriteRule ^(.*)$ <a href="<a href="http://www.test.or.jp/$1" target="_blank" rel="noopener noreferrer">http://www.test.or.jp/$1</a>"><a href="http://www.test.or.jp/$1" target="_blank" rel="noopener noreferrer">http://www.test.or.jp/$1</a></a> [R=301,L]</div><div>
</div><div>RewriteEngine off</div><div>
댓글을 작성하려면 로그인이 필요합니다.
답변 2개
10년 전
테스트는 안해봤지만.. 아래처럼 수정을 해보세요.
</p><p>RewriteCond %{HTTPS} off</p><p>RewriteRule ^join/form\.html$ https://<a href="<a href="http://www.test.or.jp/join/form.html" target="_blank" rel="noopener noreferrer">http://www.test.or.jp/join/form.html</a>">www.test.or.jp/join/form.html</a> [R=301,L]</p><p>RewriteCond %{HTTPS} off</p><p>RewriteRule ^site/contact\.html$ https://<a href="<a href="http://www.test.or.jp/site/contact.html" target="_blank" rel="noopener noreferrer">http://www.test.or.jp/site/contact.html</a>">www.test.or.jp/site/contact.html</a> [R=301,L] </p><p>
로그인 후 평가할 수 있습니다
답변에 대한 댓글 1개
n
nanati
10년 전
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
이상하게 페이지가 다운로드 되어버리네요 ... ㅠ ㅠ
보여드릴 수 없는 게 참 답답합니다 하하하
답변 감사드립니다~~