그누보드 짧은주소 사용하기
Apache 서버인 경우 rewrite_module 이 비활성화 되어 있으면 짧은 주소를 사용할수 없습니다.
위 멘트에 대한 활성화 설정방법입니다.
[root@eyedino www]# httpd -M
------------생략---------------------
negotiation_module (shared)
remoteip_module (shared)
reqtimeout_module (shared)
request_module (shared)
rewrite_module (shared) //있으면 활성된 것이고 없으면 다음단계 진입
setenvif_module (shared)
slotmem_plain_module (shared)
slotmem_shm_module (shared)
socache_dbm_module (shared)
socache_memcache_module (shared)
-------------생략------------------------
다음단계
[root@eyedino www]# nano /etc/httpd/conf.modules.d/00-base.conf
또는 vi editor
[root@eyedino www]# vi /etc/httpd/conf.modules.d/00-base.conf
마지막줄에 붙여넣기
LoadModule rewrite_module modules/mod_rewrite.so
하시면 기본설정은 끝납니다.
.htaccess 파일설정
아시는 것처럼 루트 홈폴더 에
그누보드 환경설정/짧은주소/apache 설정 코드 보기를 복사하여 붙여넣기합니다.
#### 그누보드5 rewrite BEGIN #####
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
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>
#### 그누보드5 rewrite END #####
.htaccess파일을 저장합니다.
(혹시 root 소유권 으로 실행 안될 수도 있으니 소유권도 변경 바랍니다.
[root@eyedino www]# chown eyedino.eyedino .htaccess
마지막 단계
아파치 설정파일 설정
[root@eyedino www]# nano /etc/httpd/conf/httpd.conf
또는
[root@eyedino www]# vi nano /etc/httpd/conf/httpd.conf
<Directory "/home/*****/www">
AllowOverride None -> ALL 바꿈
# Allow open access:
Require all granted
</Directory>
<Directory "/home/*****/www">
AllowOverride ALL
# Allow open access:
Require all granted
</Directory>
CETOS8 에서는 기본값으로
-------------생략-----------------
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<Files ".ht*">
Require all denied
</Files>
-----------생략-------------------
이부분 막아놨더군요!
#<Files ".ht*">
# Require all denied
#</Files>
주석정리 해주시고
httpd 재시작하시면 끝~
[root@eyedino www]# systemctl restart httpd
도움이 되었으면 좋겠습니다.
댓글 6개
게시판 목록
그누보드5 팁자료실
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 공지 | 3년 전 | 4427 | ||
| 2694 | 2개월 전 | 197 | ||
| 2693 | 2개월 전 | 155 | ||
| 2692 | 2개월 전 | 163 | ||
| 2691 | 2개월 전 | 178 | ||
| 2690 | 2개월 전 | 330 | ||
| 2689 | 2개월 전 | 241 | ||
| 2688 |
|
2개월 전 | 444 | |
| 2687 | 2개월 전 | 297 | ||
| 2686 |
선택과집중
|
2개월 전 | 334 | |
| 2685 | 2개월 전 | 296 | ||
| 2684 | 2개월 전 | 355 | ||
| 2683 | 3개월 전 | 487 | ||
| 2682 | 3개월 전 | 281 | ||
| 2681 | 3개월 전 | 306 | ||
| 2680 |
선택과집중
|
3개월 전 | 279 | |
| 2679 | 3개월 전 | 334 | ||
| 2678 |
|
3개월 전 | 432 | |
| 2677 |
|
3개월 전 | 505 | |
| 2676 | 3개월 전 | 331 | ||
| 2675 | 3개월 전 | 308 | ||
| 2674 |
선택과집중
|
3개월 전 | 483 | |
| 2673 |
|
3개월 전 | 324 | |
| 2672 | 3개월 전 | 341 | ||
| 2671 | 3개월 전 | 288 | ||
| 2670 | 3개월 전 | 264 | ||
| 2669 | 3개월 전 | 377 | ||
| 2668 | 3개월 전 | 293 | ||
| 2667 |
선택과집중
|
3개월 전 | 489 | |
| 2666 |
선택과집중
|
3개월 전 | 473 | |
| 2665 |
선택과집중
|
3개월 전 | 412 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기