리라이트 규칙 수정

This commit is contained in:
thisgun
2018-10-01 18:35:08 +09:00
parent 2757fb46f1
commit f6d994d810
2 changed files with 10 additions and 9 deletions
+9 -7
View File
@@ -34,10 +34,10 @@ add_javascript('<script src="'.G5_JS_URL.'/remodal/remodal.js"></script>', 10);
</div>
<div>
<?php if ( $is_apache && !$is_write_file ){ ?>
<button type="button" data-remodal-target="modal_apache">Apache 설정 보기</button>
<?php if ( $is_apache ){ ?>
<button type="button" data-remodal-target="modal_apache" class="btn btn_03">Apache 설정 코드 보기</button>
<?php } else if ( $is_nginx ) { ?>
<button type="button" data-remodal-target="modal_nginx">Nginx 설정 보기</button>
<button type="button" data-remodal-target="modal_nginx" class="btn btn_03">Nginx 설정 코드 보기</button>
<?php } ?>
</div>
@@ -75,10 +75,12 @@ add_javascript('<script src="'.G5_JS_URL.'/remodal/remodal.js"></script>', 10);
<span class="txt">닫기</span>
</button>
<h4 class="copy_title">아래 코드를 복사하여 .htaccess 파일에 붙여넣기 하여 주세요.</h4>
<textarea readonly="readonly" rows="10">
<?php echo get_mod_rewrite_rules(true); ?>
</textarea>
<h4 class="copy_title">.htaccess 파일에 적용할 코드입니다.
<?php if( ! $is_write_file ) { ?>
<br>아래 코드를 복사하여 .htaccess 파일에 붙여넣기 하여 주세요.
<?php } ?>
</h4>
<textarea readonly="readonly" rows="10"><?php echo get_mod_rewrite_rules(true); ?></textarea>
</div>
<div class="is_rewrite remodal" data-remodal-id="modal_nginx" role="dialog" aria-labelledby="modalNginx" aria-describedby="modal2Desc">
+1 -2
View File
@@ -208,12 +208,11 @@ function get_mod_rewrite_rules($return_string=false){
$rules[] = 'RewriteRule ^([0-9a-zA-Z_]+)$ '.G5_BBS_DIR.'/board.php?bo_table=$1&rewrite=1 [QSA,L]';
$rules[] = 'RewriteRule ^([0-9a-zA-Z_]+)/([^/]+)/$ '.G5_BBS_DIR.'/board.php?bo_table=$1&wr_seo_title=$2&rewrite=1 [QSA,L]';
$rules[] = 'RewriteRule ^([0-9a-zA-Z_]+)/write$ '.G5_BBS_DIR.'/write.php?bo_table=$1&rewrite=1 [QSA,L]';
$rules[] = 'RewriteRule ^([0-9a-zA-Z_]+)/p([0-9]+)$ '.G5_BBS_DIR.'/board.php?bo_table=$1&page=$2 [QSA,L]';
$rules[] = 'RewriteRule ^([0-9a-zA-Z_]+)/([0-9]+)$ '.G5_BBS_DIR.'/board.php?bo_table=$1&wr_id=$2&rewrite=1 [QSA,L]';
$rules[] = '</IfModule>';
$rules[] = '#### '.G5_VERSION.' rewrite EOF #####';
return $return_string ? implode('\n', $rules) : $rules;
return $return_string ? implode("\n", $rules) : $rules;
}
function update_rewrite_rules(){