Created
September 17, 2015 14:34
-
-
Save YuzuruSano/a24adb7ccfb903ce5960 to your computer and use it in GitHub Desktop.
【concrete5】下層ディレクトリからファイルを動かさずにルートで公開する(参考:http://concrete5-japan.org/community/forums/5-7-x/post-10739/)
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.html index.php | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^$ index.php [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_URI} !^concrete5dir/ [NC] | |
RewriteRule ^(.*)$ /concrete5dir/$1 |
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
# @concrete5dir/ | |
# -- concrete5 urls start -- | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ /concrete5dir/index.php/$1 [L] | |
</IfModule> | |
# -- concrete5 urls end -- |
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 | |
//@concrete5dir/ | |
$_SERVER['REDIRECT_URL'] = str_replace('concrete5dir/', '', $_SERVER['REDIRECT_URL']); | |
$_SERVER['ORIG_PATH_INFO'] = str_replace('concrete5dir/', '', $_SERVER['ORIG_PATH_INFO']); | |
$_SERVER['PATH_INFO'] = str_replace('concrete5dir/', '', $_SERVER['PATH_INFO']); | |
$_SERVER['SCRIPT_NAME'] = str_replace('concrete5dir/', '', $_SERVER['SCRIPT_NAME']); | |
require('concrete/dispatcher.php'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment