Skip to content

Instantly share code, notes, and snippets.

@sharkpp
Last active December 29, 2015 19:29
Show Gist options
  • Save sharkpp/7718075 to your computer and use it in GitHub Desktop.
Save sharkpp/7718075 to your computer and use it in GitHub Desktop.
index.phar 用 .htaccess
Options +FollowSymLinks
DirectoryIndex index.phar
AddType application/x-httpd-php .phar
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
<IfModule mod_fcgid.c>
RewriteRule ^(.*)$ index.phar?/$1 [QSA,L]
</IfModule>
<IfModule !mod_fcgid.c>
<IfModule mod_php5.c>
RewriteRule ^(.*)$ index.phar/$1 [L]
</IfModule>
<IfModule !mod_php5.c>
RewriteRule ^(.*)$ index.phar?/$1 [QSA,L]
</IfModule>
</IfModule>
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment