RewriteEngine On

# 如果程序放在子目录中，请将 / 修改为 /子目录/
RewriteBase /

# 如果需要将 www 开头的域名 301 跳转到主域名，请取消下列两行的注释
# RewriteCond %{HTTP_HOST} ^www.asthis.net$ [NC]
# RewriteRule ^(.*)$ http://asthis.net/$1 [L,R=301]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
# apache 2.4
#RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]