diff --git a/adm/_rewrite_config_form.php b/adm/_rewrite_config_form.php
index 4c2b79dca..008d7e915 100644
--- a/adm/_rewrite_config_form.php
+++ b/adm/_rewrite_config_form.php
@@ -70,34 +70,27 @@ add_javascript('', 10);
-
+
-
.htaccess 파일에 적용할 코드입니다.
-
-
아래 코드를 복사하여 .htaccess 파일에 붙여넣기 하여 주세요.
-
-
+ .htaccess 파일에 적용할 코드입니다.
+
+
아래 코드를 복사하여 .htaccess 파일에 붙여넣기 하여 주세요.
+
+
-
아래 코드를 복사하여 nginx 설정 파일에 적용해 주세요.
-
+
+ 아래 코드를 복사하여 nginx 설정 파일에 적용해 주세요.
+
diff --git a/adm/sql_write.sql b/adm/sql_write.sql
index e4394f34a..9f679675b 100644
--- a/adm/sql_write.sql
+++ b/adm/sql_write.sql
@@ -10,7 +10,7 @@ CREATE TABLE `__TABLE_NAME__` (
`wr_option` set('html1','html2','secret','mail') NOT NULL,
`wr_subject` varchar(255) NOT NULL,
`wr_content` text NOT NULL,
- `wr_seo_title` varchar(255) NOT NULL DEFAULT ''
+ `wr_seo_title` varchar(255) NOT NULL DEFAULT '',
`wr_link1` text NOT NULL,
`wr_link2` text NOT NULL,
`wr_link1_hit` int(11) NOT NULL DEFAULT '0',
diff --git a/common.php b/common.php
index 52fbb1e9e..c3b9d3dcd 100644
--- a/common.php
+++ b/common.php
@@ -125,7 +125,7 @@ $g5 = array();
$g5_debug = array('php'=>array(),'sql'=>array());
include_once(G5_LIB_PATH.'/hook.lib.php'); // hook 함수 파일
-include_once(G5_LIB_PATH.'/get_data.lib.php');
+include_once(G5_LIB_PATH.'/get_data.lib.php'); // 데이타 가져오는 함수 모음
include_once(G5_LIB_PATH.'/uri.lib.php'); // URL 함수 파일
include_once(G5_LIB_PATH.'/cache.lib.php');
diff --git a/install/ajax.install.check.php b/install/ajax.install.check.php
index 381fd380a..d03777ec5 100644
--- a/install/ajax.install.check.php
+++ b/install/ajax.install.check.php
@@ -4,6 +4,9 @@ include_once('../lib/json.lib.php');
include_once('../lib/common.lib.php'); // 공통 라이브러리
include_once('./install.function.php'); // 인스톨 과정 함수 모음
+include_once('../lib/hook.lib.php'); // hook 함수 파일
+include_once('../lib/get_data.lib.php'); // 데이타 가져오는 함수 모음
+
$data_path = '../'.G5_DATA_DIR;
// 파일이 존재한다면 설치할 수 없다.
diff --git a/lib/uri.lib.php b/lib/uri.lib.php
index 00c620a04..9da9633cb 100644
--- a/lib/uri.lib.php
+++ b/lib/uri.lib.php
@@ -188,6 +188,29 @@ function exist_seo_title_recursive($type, $seo_title, $write_table, $sql_id=0){
return exist_seo_title_recursive($type, $seo_title, $write_table, $sql_id);
}
+function get_nginx_conf_rules($return_string=false){
+
+ $get_path_url = parse_url( G5_URL );
+
+ $base_path = isset($get_path_url['path']) ? $get_path_url['path'].'/' : '/';
+
+ $rules = array();
+
+ $rules[] = '#### '.G5_VERSION.' url rules BOF #####';
+ $rules[] = 'if (!-e $request_filename){';
+ $rules[] = "rewrite ^{$base_path}content/([0-9a-zA-Z_]+)$ {$base_path}bbs/content.php?co_id=$1&rewrite=1 break;";
+ $rules[] = "rewrite ^{$base_path}content/([^/]+)/$ {$base_path}bbs/content.php?co_seo_title=$1&rewrite=1 break;";
+ $rules[] = "rewrite ^{$base_path}rss/([0-9a-zA-Z_]+)$ {$base_path}bbs/rss.php?bo_table=$1 break;";
+ $rules[] = "rewrite ^{$base_path}([0-9a-zA-Z_]+)$ {$base_path}bbs/board.php?bo_table=$1&rewrite=1 break;";
+ $rules[] = "rewrite ^{$base_path}([0-9a-zA-Z_]+)/write$ {$base_path}bbs/write.php?bo_table=$1&rewrite=1 break;";
+ $rules[] = "rewrite ^{$base_path}([0-9a-zA-Z_]+)/([^/]+)/$ {$base_path}bbs/board.php?bo_table=$1&wr_seo_title=$2&rewrite=1 break;";
+ $rules[] = "rewrite ^{$base_path}([0-9a-zA-Z_]+)/([0-9]+)$ {$base_path}bbs/board.php?bo_table=$1&wr_id=$2&rewrite=1 break;";
+ $rules[] = '}';
+ $rules[] = '#### '.G5_VERSION.' url rules EOF #####';
+
+ return $return_string ? implode("\n", $rules) : $rules;
+}
+
function get_mod_rewrite_rules($return_string=false){
$get_path_url = parse_url( G5_URL );