Skip to content
This repository has been archived by the owner on Mar 25, 2019. It is now read-only.

Commit

Permalink
issue #601: Добавить возможность простой локальной развёртки
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaev committed Sep 23, 2017
1 parent 0a38de1 commit 8f648ac
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Drupal
sites/**/*settings.php
sites/*/files
sites/local

/*.txt
!/robots.txt
Expand Down
3 changes: 1 addition & 2 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ DirectoryIndex index.php index.html index.htm
# To redirect all users to access the site WITHOUT the 'www.' prefix,
# (http://www.example.com/... will be redirected to http://example.com/...)
# uncomment the following:
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [OR]
RewriteCond %{HTTP_HOST} ^drupalru\.ru$ [NC]
RewriteCond %{HTTP_HOST} ^(www\.drupal|(www\.)?drupalru)\.ru$ [NC]
RewriteRule ^ http://drupal.ru%{REQUEST_URI} [L,R=301]

RewriteCond %{HTTP_HOST} ^(.+\.)drupalru\.ru$ [NC]
Expand Down
2 changes: 2 additions & 0 deletions robots.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,5 @@ Disallow: /?q=user/password/
Disallow: /?q=user/register/
Disallow: /?q=user/login/
Disallow: /?q=user/logout/

Host: http://drupal.ru
10 changes: 9 additions & 1 deletion sites/sites.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,12 @@

$sites['dev.drupal.ru'] = 'dev';
$sites['stage.drupal.ru'] = 'stage';
$sites['drupal.ru'] = 'prod';
$sites['drupal.ru'] = 'prod';


// Try to search file with list of local sites.
if (file_exists(__DIR__ . '/local.sites.php')) {
// "require_once" is not used due the fact
// that with Drush it doesn't works properly.
require __DIR__ . '/local.sites.php';
}

0 comments on commit 8f648ac

Please sign in to comment.