- Web templates
- E-commerce Templates
- CMS & Blog Templates
- Facebook Templates
- Website Builders
Drupal. How to Redirect Moving Site From Subfolder to Server Root
April 25, 2012
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 "www.mysite.com" instead of "www.mysite.com/subdirectory" 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
to:
RewriteBase /
and save the changes;
3) In the sites/default/settings.php file you need to change:
$base_url = ‘http://www.mysite.com/ 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