Last active
June 12, 2017 05:02
-
-
Save noogen/3aa0349ec1e0d64122bc1807adf6f0bc to your computer and use it in GitHub Desktop.
Concrete5.6 and below in subfolder with hidden subfolder
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_URI} !^/c5/ | |
# exclude other sub-directories if necessary | |
RewriteCond %{REQUEST_URI} !^/dev | |
RewriteCond %{REQUEST_URI} !^/dev2 | |
# exclude ssl stuff | |
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$ | |
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$ | |
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$ | |
RewriteRule ^(.*)$ c5/$1 [L] | |
</IfModule> |
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 | |
$myappfolder = 'c5/'; | |
$_SERVER['REDIRECT_URL'] = str_replace($myappfolder, '', $_SERVER['REDIRECT_URL']); | |
$_SERVER['ORIG_PATH_INFO'] = str_replace($myappfolder, '', $_SERVER['ORIG_PATH_INFO']); | |
$_SERVER['PATH_INFO'] = str_replace($myappfolder, '', $_SERVER['PATH_INFO']); | |
$_SERVER['SCRIPT_NAME'] = str_replace($myappfolder, '', $_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