Hi,
I had my site working on an old host perfectly.
I am now in the process to move to a new VPS at Servint. I have backed up all directories as well as DB from my old host, and copied and extracted on the VPS.
The first problem I have is that the new url of my site is weird.
old URL: http://www.domain.com/ - Drupal site worked perfect.
new URL: http://ip/~domain - on this Drupal only shows the front page. Every link that is press from the page get's me to a 404 page of the Apache server.
The url on the links are wrong, e.g.: http://ip/~domain/link - off course there is nothing physical in that location.
WHAT ELSE DID I TRY
* In the sites/default/settings.php I tried to uncomment
$base_url = 'http://ip/~domain'; // NO trailing slash!
this did not
* In www folder .htaccess
rewrite engine is on
RewriteBase /
# Rewrite old-style URLs of the form 'node.php?id=x'.
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{QUERY_STRING} ^id=([^&]+)$
#RewriteRule node.php index.php?q=node/view/%1 [L]
# Rewrite old-style URLs of the form 'module.php?mod=x'.
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
#RewriteRule module.php index.php?q=%1 [L]
# Rewrite current-style URLs of the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
# Saar 20090304 - rewrite /a/VLUE to /a/p.php?id=VALUE
RewriteBase /
# RewriteCond %{HTTP_HOST} ^domain.com$ [NC]
# RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301]
# RewriteRule ^a/([A-Za-z0-9-]+)?$ a/p.php?id=$1 [NC]
RewriteRule ^a/(.*)$ a/p.php?id=$1 [R=301,L]
Again, not helping.
If I try: http://ip/~domain/?q=user I get a Drupal page not found error, with a search page
Also, I am unable to login with any user - I get Apache 404 page. with the following message
404 Not Found
The server can not find the requested page:
ip/~domain/en/node?destination=node (port 80)
As long as I am unable to verify that the new VPS works, I will not update my NS information, so this is crucial.
would appreciate ALL the help you can give me.
thanks
Comments
hosts file
Hi,
Assuming that your new hosting providor has setup the site to respond to your intended domasin name and you are just waiting for DNS to "catch up", you could alter the hosts file on your PC to hold the IP address of your new webserver. This way, your PC will go direct to the new server, ignoring the old setting in DNS.
Are you using a Windows or Unix PC? On Windows, the file is at c:\windows\system32\drivers\etc\hosts and you'll need to add a line something like...
1.2.3.4 www.domain.com
Sorry if I'm teaching you to suck eggs - I can't guess your experience from your request.
***Don't forget to remove the entry when you are done***
Thanks for your comment. NO,
Thanks for your comment.
NO, I am not going to wait for that to happen. and I have NOT yet updated any DNS's for my new server. I want to test everything before the change.
I think that what my problem is, is actually the ~domain - that extra characte : '~' I have a feeling that after the first page (index.php) it's not been right/created correctly, and all pages AFTER that are 404.
NEw info I have had a new
NEw info
I have had a new installation of Drupal just now.
Again, I can see the front page: index.php, but after that, I get the same error from the Apache 404. I am sure it's that '~' character.
But I don't know how to solve this.
Please advise
no need
That's what I'm saying - there is no need to wait for DNS to change to make your new local site behave as though it was the real site.
I regularly copy a site onto apache running on my local PC and then add the actual domain name into my hosts file as 127.0.0.1. Then, rather than contact the running site on the internet, my laptop will speak straight to apache running locally. I can then test everything in exactly the same way as it would be when live, just in my own little sandpit.
Hi Rick, Thanks again. I do
Hi Rick,
Thanks again. I do know about hosts, I can not assign the '~' in the host. IF I could, the hosts file would need to look like:
ip/~domain www.domain.com
And that is impossible.
I am using Windows to check this.
I thought it might be with the rewrite engine, but I feel it has nothing to do with it.
The installation root directory is /public_html/ but to access it, it prefixes with the ~domain
so basiclly, what's on the server at: /public_html/index.php is shown on the browswe as: http://ip/~domain/index.php - and no links works after that page.
I had this issue with my site
I had this issue with my site as well on Site5 and was able to get around it by editing the .htaccess file and setting it to:
RewriteBase /~sitename
OMG ME
I have made the most unpleasent error.
I am able to access my site now after updating the CORRECT hosts file (yea) in my windows pc. Don't know how, but I had 2 files and I updated the wrong one.
DOH.
Thanks to all that helped.