mod_rewrite를 이용한 워드프레스 주소에서 archives 제거하기
Apache의 mod_rewrite 모듈을 이용해서 워드프레스 접속 주소에서 archives를 제거하는 방법이다. 즉 https://chicpro.dev/archives/1234 의 접속주소를 https://chicpro.dev/1234 로 변경하는 것이다. 이것을 적용하기 전에 워드프레스 설정페이지의 Permalinks 설정에서 아래 이미지처럼 변경해야 한다. 이제 mod_rewrite 설정을 적용해야 하는데 워드프레스가 설치된 디렉토리로 이동 후 .htaccess 파일을 열어 아래 코드를 추가해준다. <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} ^/archives/([0-9]+)$ [NC] …