.htaccess 파일 수정질문 채택완료
제가 http 접속시 https로 리다이렉트되게 하는거는 확인했는데요
http://aaaa.com/page/page.php 로 접속시
https://aaaa.com 인덱스 페이지로 가는고 있는데
http://aaaa.com/page/page.php 로 접속시
https://aaaa.com/page/page.php 이렇게 앞에 http 부분만 https 로 바꿔서 기존 접속했던 url 살려서 가는 방법이 없을까요?
아래처럼 구글링해서 몇개 해봤는데 잘안되서 질문드립니다 ㅠ
RewriteCond %{ENV:HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
답변 1개
RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
답변에 대한 댓글 2개
ewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
[/code]
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
RewriteEngine On
RewriteBase /
RewriteCond %{ENV:HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
이상태인데 답변주신걸로 변경해도 계속 메인 index 페이지로 넘어갑니다ㅠ