Hello.

I am having terrible trouble with my drupal installation at the moment.
I created my site at http://www.example.com/drupal

I am now trying to move my site from the '/drupal' location to work straight from the 'http://www.example.com' location
I have copied all of the files from the '/drupal' location and placed them into the 'http://www.example.com' location.

Unfortunately this does not seem to have worked for me. Although my site loads almost fine from 'http://www.example.com' all of my links still have the /example in them. Its bizzare though because they still work despite the /example directory no longer existing.
What I want is to get rid of the /example out of all of my links.
I really would appreciate any advice.
I have read all of the related topics in the forum (of which there are many) but I have not found one which addresses my problem.
Thank you
Tom

Comments

eli03’s picture

check your htaccess

make sure your RewriteBase not set to drupal folder

see

sample

# RewriteBase /

  # Rewrite URLs of the form 'index.php?q=x'.
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

----------
My Drupal site: promotional items corporate gifts srednarb - busby seo test - Come and Visit the beautiful Philippine Paradise!

Anonymous’s picture

Thank you for your reply. When I tried your suggestion unfortunately it did not work.
Below I have pasted a copy of what the rewrite section of my htaccess file looks like:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

Do you or anyone else have any other suggestions for what the problem may be.
Again, I have moved my drupal site from www.example.com/drupal to www.example.com
Now that I have moved the site my drupal links are all still showing up with the /drupal in them.
Thanks
Tom

Anonymous’s picture

Hello.
I have just resolved the problem, or atleast most of it. It turned out that the line you mentioned needed changing in the settings.php folder.
The remaining problem is that the links to my forum and my taxonomy links still include /drupal in them.

Any ideas why this may be?
Thanks Tom

Anonymous’s picture

Just found the solution.

Thank you all!

kellypearsonvss’s picture

I have the exact same issue in your your thread... can you please help me out?

Thanks!

Plavozont’s picture

I have successfully done just the same thing. I did all the changes related to removing "drupal" in the database dump using AkelPad.

First notice at what line starts watchdog table in the dump - there is no need to fix anything there.

Find and replace this strings:

s:59:"/var/www/html/example/drupal/modules/taxonomy/taxonomy.module"
s:52:"/var/www/html/example/modules/taxonomy/taxonomy.module"

save and reopen dump in AkelPad after this to prevent computer from freezing

src="/drupal
src="

example.com/drupal/
example.com/

save and reopen dump in AkelPad after this to prevent computer from freezing

/drupal/sites/default/files/
/sites/default/files/

Additionally find this using regular expressions:
s\:[0-9]+\:\"[^\n]*?\/drupal\/[^\n]*?\";

and if founded string looks like this:

s:597:"...";

substract length of "drupal/" (it is 7) and remove it, to make it look like this:

s:590:"...";

That's it. Restore database from that dump, move source code to root directory, start your web-server, open example.com, check every link and every function that you have on your site to find some tiny issues that are left and it eventually should work well with no trobles at all.