SSL https 자동 변환 .htaccess > PHP

STUDY ROOM

PHP

SSL https 자동 변환 .htaccess

페이지 정보

작성자 JMStudy 작성일19-06-03 15:30 조회14,940회 댓글0건

본문

RewriteEngine On

 

RewriteCond %{HTTPS} off

RewriteCond %{HTTP:X-Forwarded-Proto} !https

RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]​ 



#### 그누보드5 추가 작업

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /


아래 2줄 추가

RewriteCond %{ENV:HTTPS} !=on

RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]


RewriteCond %{REQUEST_FILENAME} -f [OR]

RewriteCond %{REQUEST_FILENAME} -d

RewriteRule ^ - [L]

RewriteRule ^shop/list-([0-9a-z]+)$  shop/list.php?ca_id=$1&rewrite=1  [QSA,L]

RewriteRule ^shop/type-([0-9a-z]+)$  shop/listtype.php?type=$1&rewrite=1  [QSA,L]

RewriteRule ^shop/([0-9a-zA-Z_\-]+)$  shop/item.php?it_id=$1&rewrite=1  [QSA,L]

RewriteRule ^shop/([^/]+)/$  shop/item.php?it_seo_title=$1&rewrite=1  [QSA,L]

RewriteRule ^content/([0-9a-zA-Z_]+)$  bbs/content.php?co_id=$1&rewrite=1  [QSA,L]

RewriteRule ^content/([^/]+)/$  bbs/content.php?co_seo_title=$1&rewrite=1      [QSA,L]

RewriteRule ^rss/([0-9a-zA-Z_]+)$  bbs/rss.php?bo_table=$1        [QSA,L]

RewriteRule ^([0-9a-zA-Z_]+)$  bbs/board.php?bo_table=$1&rewrite=1      [QSA,L]

RewriteRule ^([0-9a-zA-Z_]+)/([^/]+)/$ bbs/board.php?bo_table=$1&wr_seo_title=$2&rewrite=1      [QSA,L]

RewriteRule ^([0-9a-zA-Z_]+)/write$  bbs/write.php?bo_table=$1&rewrite=1    [QSA,L]

RewriteRule ^([0-9a-zA-Z_]+)/([0-9]+)$  bbs/board.php?bo_table=$1&wr_id=$2&rewrite=1  [QSA,L]

</IfModule>


댓글목록

등록된 댓글이 없습니다.