Drupal 7 dans un sous répertoire

Drupal 7 dans un sous répertoire

Mardi, Septembre 17, 2013

Create a new .htaccess file and place it in the web root with the following code:

Options -Indexes
Options +FollowSymLinks

RewriteEngine on

# Redirect all user to without WWW
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^ http://%1%{REQUEST_URI} [L,R=301]

# Serve Drupal 7 from sub directory in web root
RewriteRule ^$ drupal7/index.php [L]
RewriteCond %{DOCUMENT_ROOT}/drupal7%{REQUEST_URI} -f
RewriteRule .* drupal7/$0 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* drupal7/index.php?q=$0 [QSA]

Now you need to change 1 more line in sites/default/settings.php.
Look for the $base_path variable, uncomment it and change the value to your domain.

$base_url = 'http:// kahthong.com';  // NO trailing slash! // Please remove the space in the URL

You're now done!

Credits to forum topic here http://drupal.org/node/144643 by pulsifer.

Bienvenue sur le blog !

Il s'agissait au départ d'un recueil de notes donc certains billets sont plutôt succincts.
J'espère que vous y trouverez l'info qu'il vous manque dans votre recherche.
Vos commentaires sont les bienvenus.

Bonne lecture !

Mois / Années

Recherche