Created
December 19, 2016 02:37
-
-
Save henrytran9x/ae6a92d2d78edc7b5244f944b88576b8 to your computer and use it in GitHub Desktop.
*SOLVED* Drupal installed in subfolder, want url without subfolder Drupal
This file contains hidden or 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
For most of my installs, I have Drupal running from subfolders. Here is what I do: | |
settings.php | |
Uncomment and modify this line: | |
# $base_url = 'http://www.example.com'; // NO trailing slash! | |
.htaccess (in your subfolder) | |
Unless there are server/web host-specific items to add, this can be left alone | |
.htaccss (in Web root) | |
Options -Indexes | |
RewriteEngine on | |
Options +FollowSymLinks | |
RewriteCond %{HTTP_HOST} !^www\.[yourdomain]\.[your TLD]$ [NC] | |
RewriteRule .* http://www..[yourdomain].[your TLD]/ [L,R=301] | |
RewriteRule ^$ production/index.php [L] | |
RewriteCond %{DOCUMENT_ROOT}/[subfolder]%{REQUEST_URI} -f | |
RewriteRule .* [subfolder]/$0 [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule .*[subfolder]/index.php?q=$0 [QSA] | |
Hope this helps. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment