Access Drupal with temporary URL

Sometimes we want to check our Drupal site just before publishing it.

You would like to access your drupal site using a temporary URL.For example: http://serverip/~username/drupal

Note : drupal is the directory where you have configured drupal for your domain.

In order to access the drupal site using a temporary URL,Follow the steps as below.

1) Open the file /public_html/sites/default/settings.php

2) Find the setting “$base_url = ”.
Uncomment the line and configure it to as follows:

$base_url = ‘http://serverip/~test’;

3)Also configure the .htaccess in order to correct the redirections.

4) Open the .htaccess file in the drupal directory. /public_html/drupal/.htaccess)

In this file find the line which says RewriteBase /.

Uncomment the line and change it as follows:

RewriteBase /~username

5) Save the file.

You can now access your drupal with a temporary URL. Eg. http://serverIP/~username/drupal.

[wpfmb type=’info’ theme=2]While login to  Drupal if you are getting error you can check our post Drupal:The username admin has not been activated or is blocked [/wpfmb]