.htaccess 설정 파일 (URL 재작성)
2021. 9. 19. 22:14ㆍ웹 서버 구축
Enable mod_rewrite
sudo a2enmod rewrite
sudo systemctl restart apache2
/etc/apache2/apache2.conf 수정
<Directory /var/www/html/Ninja/public>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
/var/www/html/Ninja/public/.htaccess
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [NC,L,QSA]
'웹 서버 구축' 카테고리의 다른 글
password hash (PASSWORD_BCRYPT) (0) | 2021.09.25 |
---|---|
한글로만 구성 정규 표현식 (0) | 2021.09.24 |
PDOStatement::bindValue (0) | 2021.09.17 |
모바일에서 접속 시 모바일용 사이트로 자동이동 구현 (0) | 2021.08.25 |
데이터베이스 사용자 (0) | 2021.08.12 |