WordPress index.php remove

워드프레스의 퍼마링크는 기본으로 index.php 를 사용한다. 이걸 .htaccess 를 수정해서 index.php 없이 사용할 수 있게 해주는 스크립트이다.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /(.*)index.php(.*) HTTP/ [NC]
RewriteRule ^index.php(.*)$ https://sewonist.com/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

<IfModule mod_rewrite.c>RewriteEngine OnRewriteBase /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /(.*)index.php(.*) HTTP/ [NC]RewriteRule ^index.php(.*)$ https://sewonist.com/$1 [R=301,L] RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule . /index.php [L] </IfModule>

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.