Posted by pkchoo on October 28, 2011 at 7:22am
Hello,
I successfully moved my site from dev to the root and everything is working great! The only issue I'm encountering is that the admin menu keeps taking me back to www.mysite.com/dev/admin, instead of keeping me at www.mysite.com/admin.
I know I'm missing something obvious. Any help would be greatly appreciated.
Thanks.
Comments
Did you flush Drupal's cache?
Did you flush Drupal's caches?
Yeah, unfortunately, that was
Yeah, unfortunately, that was one of the first things I tried. I just tried it again just in case I thought I did it, but really didn't... still didn't work :(
Thanks for your suggestion.
Did you ever edit .htaccess ?
Did you ever edit .htaccess ? There is a base URL setting in there that may be pointing to the wrong location.
Full Fat Things ( http://fullfatthings.com ), my Drupal consultancy that makes sites fast.
I did. I was following
I did.
I was following something I found online (http://kb.siteground.com/article/How_can_I_transfer_my_Drupal_site_from_...) that said to...
"Change the RewriteBase dir in your .htaccess file to be /
The contents of your .htaccess file should contain a line like the one below:
RewriteBase /"
I thought I reverted it back to what it was originally. What should it be?
Since you're following those
Since you're following those guidelines, I know it may sound redundant mentioning it again, but in the settings.php did you make sure $base_url = 'http://www.YourDomainName.com'; // NO trailing slash!
and on the off shoot you may use cookies that may redirect you or such:
$cookie_domain = 'YourDomainName.com';
Thanks gdruckman
Same issue now resolved.
The htaccess file was right but my setting.php had old url in it.
Thanks, all seems to be working now.
so, i should do all the
so, i should do all the following?
1) uncomment RewriteBase / in .htaccess
2) and uncomment and set the $base_url in settngs.php
3) and uncomment and set $cookie_domain = 'YourDomainName.com' also in settings.php
Thank you.
Yes, uncomment them, put in
Yes, uncomment them, put in the right parameters, flush all cashes and keep your fingers crossed :)
Let us know if it worked (or not...).
haha... the fingers crossed
haha... the fingers crossed is not too reassuring :)
I did all of the above, but eventually undid both the change to the $cookie_domain and the $base_url. I was getting an error stating that my page was redirecting in a way that would never end, when I undid the $cookei_domain, I was able to access the site. I was also having problems with the securepages and I read somewhere that I shouldn't set the $base_url, so I undid that as well.
Regardless, in the end, it's working :)
Thank you everyone for your help!
heh... so at first you edited
heh... so at first you edited the .htaccess file, and it didn't work, then you edited the settings.php file and it broke even more, you deleted the changes in the settings.php file, went back to the same configuration you have before with only the .htaccess changes, and suddenly it does work?
Very odd... or were there some other steps you took in between?
Quite curious about it now :)
Yeah, I wonder myself. I was
Yeah, I wonder myself. I was trying to stop the errors, so I just started undoing things one at a time. If someone knows definitively what has bearing on what, I would be grateful.
Thanks.
Secure Page is the culprit
Secure pages gets me every time when moving from dev to live. If you move your database from dev to live without disabling secure pages first you will find yourself with a redirection to dev each time you use any links going from public to secure pages.
Thanks for the info. In my
Thanks for the info.
In my case, I didn't enable the securepages module until after moving to the live site, but I definitely do feel like securepages is messing with my head. Ssl with secure pages was working fine yesterday. I wake up this morning and now the site is acting the exact opposite as it should. Secure pages are unsecured and non-secure pages are secure. Instead, I just allowed all pages to be ssl, for now. Sheesh!
Secure pages settings
Try this setup for secure pages:
Select Make secure only the listed pages.
Add the following to the text field:
node/add*
node//edit
user/
user
admin*
cart/*
/ajax/
Add the following to the ignore Pages:
/autocomplete/
/ajax/
/views/edit/
If you notice, the /ajax/ is on both list. I can't recall the exact reason but it works (one of Drupal anomalies I guess...). Make sure that secure base url matches your ssl certificate. Certificate must be enabled and working properly before enabling securepages.
This module may act out at times but it is a great solution for securing pages.
I hope this helps.
I made your edits and so far
I made your edits and so far so good.
Thank you. I appreciate the help!
Solved by disabling Secure Pages
I spent about a half hour trying to figure out this exact same problem: admin menu linking to original site url after migrating.
Thanks!
similar problems
I'm not sure if it's appropriate to revive this old discussion but I can't for the life of me figure out what I've done wrong. My apologies if adding to this thread is not right.
I saw the instructions referenced upthread (http://kb.siteground.com/article/How_can_I_transfer_my_Drupal_site_from_...) and tried to follow those myself but it doesn't seem to be working. It may be that I did the steps out of order, but I didn't see those instructions until after I'd tried myself...
Originally the site's root directory had an old, non Drupal site (http://www.mydomain.com). A while ago I made a subdirectory (http://www.mydomain.com/dp) in which I installed Drupal 7 and made a beta version of the website. That beta version is now approved and ready to go live.
So, to make it the live site I did the following:
1) made a backup of the whole site
2) removed the old, non-Drupal site files from root directory
3) moved all the content of the "dp" subdirectory to the root directory
4) pointed browser at root directory (http://www.mydomain.com) and got a warning about Drupal already being installed with several options
5) chose to look at site
6) home page looks fine but alias links and /user and /admin don't work
7) tried changing settings.php file, but I hadn't changed that when I first set it up so there was nothing to change
8) changed $base_url setting to "http://www.mydomain.com/dp" and now I can access site but it's going to the version in the "dp" subdirectory
What did I do wrong? Should I return to backup of whole site and do it again? Site is working but is using subdirectory version and I want it to be live version
When I hit links in menus on home page to pages with aliases I get a 404 error. Also get 404 for http://www.mydomain.com/node/10 or http://www.mydomain.com/user
So I can't edit the pages or the links because I can't get into admin area on moved site.
Is there a way to return to the warning page that told me I already had Drupal installed and did I want to change settings (which I wish I'd done...)
???
And is there some way to get back
You just need to correct the
You just need to correct the paths right?
First, I'd re-set the base url to its default.
Then, I'd export the sub-directory database using PHPmysql or something similar. Open the database in a text editor and do a search on mydomain.com/dp and replace it with mydomain.com. Save as a new db file.
Finally, I'd create a separate database for your production site and import the modified database into it.
Usually, I work on sub-domains, not sub-directories. Saves you this headache.
Vhost and clean urls..perhaps
came across something like this too and solved it with the correct vhost settings and if the old server used clean urls ..make sure u install mod-rewrite for apache other wise ur links are still looking at paths the server cant understand.
.::hacker101::.