mirror of
https://github.com/silverstripe/silverstripe-installer
synced 2024-10-22 17:05:33 +02:00
ENHANCEMENT Installer now has a fallback for mod_rewrite detection by setting an environment variable in .htaccess when "<IfModule mod_rewrite.c>" directive is satisfied
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.4@112973 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
84cbba8bed
commit
fba76de203
@ -18,7 +18,9 @@ ErrorDocument 500 /assets/error-500.html
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
SetEnv HTTP_MOD_REWRITE On
|
||||
RewriteEngine On
|
||||
|
||||
RewriteCond %{REQUEST_URI} ^(.*)$
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
|
||||
|
@ -645,6 +645,8 @@ class InstallRequirements {
|
||||
function testApacheRewriteExists($moduleName = 'mod_rewrite') {
|
||||
if(function_exists('apache_get_modules') && in_array($moduleName, apache_get_modules())) {
|
||||
return true;
|
||||
} elseif(isset($_SERVER['HTTP_MOD_REWRITE']) && $_SERVER['HTTP_MOD_REWRITE'] == 'On') {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user