Temporary Drupal site redirect problem on Bluehost
I was recently setting up a site hosted by bluehost and running drupal.
Before you transfer DNS authority to bluehost, they give you a temporary URL to allow you to get the site up and running and tested before you make it live. The URL is in this format
http:/~
or
http://69.89.31.189/~camelrch
I installed Drupal using ‘fantastico’, which is available from the bluehost control panel. But to get Drupal to recognize this ‘test’ URL, you have to change two things.
(either make backups of these files first, or copy and comment out the original lines before you change them because once the site goes live, you will need to undo the changes you make below.)
1. Change the “$base_url = ” in /public_html/sites/default/settings.php to your temporary URL WITHOUT A TRAILING SLASH!!!!
for example:
$base_url = ‘http://69.89.31.189/~camelrch’;
now the site should work, but on certain links on the site, the browser will error out with a bad redirect and the URL in the browser will look something like this:
http:://69.89.31.189/~camelrch/~camelrch/~camelrch/~camelrch/~camelrch/ …etc
so to correct this…
2. Uncomment the “RewriteBase /drupal” line in /public_html/.htaccess and change it from:
#RewriteBase /drupal
to
RewriteBase /~
for example:
RewriteBase /~camelrch
and now you should be able to set up and test the website you created in Drupal. Once you are finished and have tested everything successfully, be sure to undo the above changes so that the site works properly once bluehost’s DNS becomes authoritative for the site and the real URL is working.
