Hi all, sorry for the silly question here... but I'm stumped.
I had Drupal running great in a test directory (called "drop")... but then I tried to change the directory to the root and I can't figure out how to configure all the links to work again.

Rather than going to mydomain.com they go to mydomain.com/drop

See what I mean?

Where is the setting to change the base installation URLs so they point properly now that I've changed the location of drupal? Thanks so much. -Charlie

Comments

gabriella’s picture

Look for "$base_url " in the file /sites/default/settings.php and change that to match the address to your drupal installation.

Hadi Farnoud’s picture

just to add to this answer, you need to modify .htaccess if you have drupal installed in a subdirectory. look for RewriteBase and change it to RewriteBase /

Ritvi’s picture

I am an newbie to drupal 8 and cannot find a method to change the base url. Urgently required help. SSL has been configured in my website only my home page is throwing error(connection not secure), along with the canonical url and shortlink. PLease help me out.

charliecheney’s picture

I'm so sorry, I found it...
I needed to change it in sites/default/setting.php

Sorry to have bothered you, thanks so much for providing such a great tool and community. All the best. -Charlie

nuclear_hellhound’s picture

what about in drupal6?
thanks,
h

iceman90’s picture

The same should work in Drupal6. The line is commented out, but should still work just fine.

OneTwoTait’s picture

Doing this results in an error with Views.
After updating anything, I get just a long string of text. The only way to avoid this I've found is to keep the base URL without "www" on it, which is what it was originally. I'll try to fix this...

OneTwoTait’s picture

ahhhh nevermind... typo.

grakhul’s picture

I have a similar problem with Drupal 6, but:

I first installed drupal only using an IP address. Drupal works excellent using only the ip. Can navigate through the entire site.
Got a domainname for my site and pointed it to the IP.
Only when I click links within drupal - It still calls all pages by IP since this is what I installed it with.
I know I can just uncomment the baseurl, but where oh where is Drupal storing the IP? I wanna replace it with the domain name of the site.

[edit] just saw this was for drupal 4

saurabh.bhambry’s picture

Seems like u sorted out the problem... I am facing a similar problem but dont know wat to do .. its making me tear my hair out .. cant even locate where u re-posted this issue..

robbin.zhao’s picture

1.
Add a .htaccess on the parent directory, and put the following text to it,

RewriteEngine on

#index page
RewriteRule ^$ Drupal/index.php [L]

#the other pages
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* Drupal/$0 [L]

2.
Go to your Drupal directory, changed the settings.php file which locates at default/settings.php.
Change the $base_url to your domain url, such as
$base_url = ‘http://www.domain.com

uhargude1’s picture

HI,
I am newly working with drupal.I have created my website on localhost and i want to host it on server so i can't host it successfully because of database connectivity problems .so can you please tell me about database configuration in drupal and changing the paths in setttings.php,lock.inc.