Featured templates

Drupal. How to Redirect Moving Site From Subfolder to Server Root

Norman Fisher April 25, 2012
Rating: 5.0. From 1 vote.
Please wait...

This tutorial is going to show you how to move your Drupal site from a sub-folder to the root folder, that is to make your site appear at  "" instead  of  "" in your browser.

1) Move all files from your “subdirectory” folder to the root folder (often called public_html or www). All info on how to do this should be provided by your hosting.
2) Open the .htaccessfile that is now in your root folder in any text editor and сhange:

# RewriteBase / subdirectory


RewriteBase /

and save the changes;

3) In the sites/default/settings.php file you need to change:

$base_url = ‘ subdirectory’;  // NO trailing slash!

and save the changes;

4) If some of your images in blogposts  had full links to the domain name, subfolder etc like “/ subdirectory /file_name.extension”, the best way to update them for each image manually.

Feel free to check the detailed video tutorial below:

Drupal. How to Redirect Moving Site From Subfolder to Server Root

Premium Drupal Themes
This entry was posted in Drupal Tutorials and tagged archived_tutorial, drupal, move, moving, root. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket