Temporary Drupal Site Redirect Problem on Bluehost


Tags:

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:<IP>/~<username>
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 /~<username>

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.


HI,
I am also using bluehost and the site is working fine on bluehost. The problem comes when I try to take it on localhost for further development. Whenever I key in any url (except localhost/index.html) the page gets redirected to my actual site ie http://www.imconfuzed.com/index.html instead of the localhost page im requesting.

For this I checked my settings.php, php.ini, .htaccess and dont think that there is any problem in it (I may be wrong) but never is it mentioned imconfuzed.com in those files atleast. Also I edited the database so that it did not have any reference to the link imconfuzed.com but that didnt help either.
Also a very very old backup of mine is working fine on localhost and is not being redirected.

Kindly help as im stuck without any development as I cant afford to try new things with the actual site.