Last active
September 4, 2017 10:26
-
-
Save hinaloe/8976865 to your computer and use it in GitHub Desktop.
拡張子を省略してPHPアプリを呼び出す。 ref: http://qiita.com/kimama1997/items/af3d76110e6c67a3d96f
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
RewriteEngine on | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME}\.php -f | |
RewriteRule ^(.*)$ $1.php |
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
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="omitted extension" stopProcessing="true"> | |
<match url="^(.*)$" ignoreCase="false" /> | |
<conditions> | |
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" /> | |
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" /> | |
<add input="{REQUEST_FILENAME}.php" matchType="IsFile" ignoreCase="false" /> | |
</conditions> | |
<action type="Rewrite" url="{R:1}.php" appendQueryString="true" /> | |
</rule> | |
</rules> | |
</rewrite> | |
</system.webServer> | |
</configuration> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment