apache構成php単一エントリを実現する方法
615 ワード
apacheのhttpd.conf加入、LoadModule rewrite_module modules/mod_rewrite.so前の「#」を取り除く
DocumentRoot /
Options Indexes FollowSymLinks MultiViews
AllowOverride None
#AllowOverride All
RewriteEngine on
RewriteBase /
# index.php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/?(.*)$ /index.php?%{QUERY_STRING} [L,NC]
#RewriteRule ^(.*)$ index.php?$1 [QSA,L]
DirectoryIndex index.php index.html index.htm