Skip to content

Instantly share code, notes, and snippets.

@noogen
Last active June 12, 2017 05:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save noogen/3bffc24e1001e3e6ea8478c866efd8e6 to your computer and use it in GitHub Desktop.
Save noogen/3bffc24e1001e3e6ea8478c866efd8e6 to your computer and use it in GitHub Desktop.
Concrete5.7+ in subfolder with hidden subfolder
# BEGIN Concrete5 rewrite
<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>
<?php
$myappfolder = 'c5/';
$_SERVER['PHP_SELF'] = str_replace($myappfolder, '', $_SERVER['PHP_SELF']);
$_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