'mod_rewrite.so'에 해당되는 글 1건

  1. 2013.01.17 apache mod_rewrite 설치 및 설정하기 1

1. 설치

# a2enmod rewrite


2. mod_rewrite.so 경로확인

# updatedb

# locate mod_rewrite.so

/usr/lib/apached/modules/mod_rewrite.so


3. 설정

# vim /etc/apache2/mods-enabled/rewrite.load


다음을 추가

LoadModule rewrite_module /usr/lib/apached/modules/mod_rewrite.so


4. apache설정

# vim /etc/apache2/sites-available/default


<Directory /var/www/>

Options Indexes FolloSymLinks MultiViews

AllowOverride None

...


위 부분을 아래처럼 수정(AllowOverride None를 AllowOverride all로 수정)


<Directory /var/www/>

Options Indexes FolloSymLinks MultiViews

AllowOverride all

...


5. 규칙 추가

.htaccess를 편집하여, 규칙을 추가한다.


6. 적용을 위한 서버 재시작

# service apache2 restart

혹은

# /etc/init.d/apaches2 restart




Posted by Нуеоп
이전버튼 1 이전버튼