Created
March 14, 2012 07:38
-
-
Save ttoz/2034885 to your computer and use it in GitHub Desktop.
MVCフレームワーク用の一般的な.htaccess
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DirectoryIndex index.php index.html | |
RewriteEngine on | |
# 該当ファイルが存在せず、かつindex.htmlが存在しない場合にのみ | |
# index.phpにリクエストクエリを渡して実行する。 | |
# これにより、http://domain/static_html/にアクセスがあった場合に | |
# index.phpにリライトされることなく、index.htmlを表示できる。 | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME}/index.html !-f | |
RewriteCond $1 !^(index\.php|robots\.txt) | |
RewriteRule ^(.*)$ index.php/$1 [L] [L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment