Created
November 25, 2014 22:58
-
-
Save LeeSaferite/30530ec6bb7f7ca68453 to your computer and use it in GitHub Desktop.
Remove the index.php from admin URLs in Magento
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
<?php | |
class OpenMage_Base_Model_Core_Store extends Mage_Core_Model_Store | |
{ | |
/** | |
* Add script file name to the URL if server rewrites are disabled or Magento is not installed | |
* | |
* NB: This differs from the parent just by not adding the script name to the URL for the admin site | |
* | |
* @param string $url | |
* | |
* @return string | |
*/ | |
protected function _updatePathUseRewrites($url) | |
{ | |
if (!$this->getConfig(self::XML_PATH_USE_REWRITES) || !Mage::isInstalled()) { | |
$indexFileName = $this->_isCustomEntryPoint() ? 'index.php' : basename($_SERVER['SCRIPT_FILENAME']); | |
$url .= $indexFileName . '/'; | |
} | |
return $url; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment