Alright, so I've been arguing with this for three days, and have yet to come up with any kind of solution.

I have an install of Drupal 6 installed and pretty much ready to go live. I uploaded it to my host, who has all the requirements for Clean URLs present and enabled (I know because I've used them before successfully, and have called them to verify), and checked my .htaccess to make sure its properly intact (as far as I know... I am using the Drupal default).

Now, the domain name that I'm currently working on is pointed to another server, and will remain that way, until I fully test the install on this server, so I have to access the site through its IP address.

The problem is that when I do access it that way, it Drupal tells me my system configuration does not support Clean URLs (everything else works...so far).

Frustrated, I threw the very same installation and db up on another account I have with the same host that I CAN access through a normal URL. Lo and behold, Clean URLs functions.

My question, then, is: What, in Drupal, causes it to behave like this? There is nowhere in the system to input the URL the site is functioning at, so is there some implied formatting for the URL that confuses it when you access through IP instead of the normal DOTcom? If so, is there a way to bypass this so it works for IP addresses as well?

Or, am I just doing something wrong?

Comments

MacRonin’s picture

I'm not sure what in Drupal would cause this, but can suggest another way around the problem.

What I have done in the past where I am building a site on a diff box then its final location, but still want to use the normal domain name to access. I override the host file on my computer to point to the IP I am testing from. This keeps your DNS info/update local to your box, but allows you to use the normal domain name to access your test site. It's as close to updating the live box as you can get, without touching the live site.

-------------------
http://www.PrivacyDigest.com/ News from the Privacy Front (Drupal)
http://www.SunflowerChildren.org/ Helping children around the world ( Drupal)

SamusFairchild’s picture

Alright, I kinda grasp where your coming from here, but I'm not sure it would work in my situation...
I don't currently have access to the domain name and can't change any of the info on it because my client currently has a website live at that site. I need to minimize downtime on that as much as possible, which is why I'm working from the server's IP instead of the URL.

Now, there's a very good possibility I misunderstood your suggestion, but the whole of it boils down to being able to access your local copy of the installation from the URL, correct?

MacRonin’s picture

It looks like you already found what you need, but for any future readers...

The change I am talking about occurs on Your computer(the laptop/desktop not the server) and does not impact anything else. That is why it is so powerful. Instead of going out and using the same DNS info as the rest of the folks on the net, you over-ride the domain->IP-address pointer locally(for this one domain) on your own computer. It does not require access to the old server or its official domain info at the registrar. Outside of your computer nothing is changed or impacted so there is no chance of impacting the live site. But you get to refer to the site(on your computer only) via its normal domain name example.com

-------------------
http://www.PrivacyDigest.com/ News from the Privacy Front (Drupal)
http://www.SunflowerChildren.org/ Helping children around the world ( Drupal)

SamusFairchild’s picture

Alright, that sounds kinda useful.... but how do you do it?

It won't completely solve my testing problems for Drupal (as the settings on my computer never really match the host I use...), but for systems like Wordpress, that sounds fantastic.

cog.rusty’s picture

I guess this is about the hosts file, where you can force some URLs to go to your local IP, ignoring the Web's DNS system. For example:

127.0.0.1  localhost
127.0.0.1  www.example.com

See:
http://en.wikipedia.org/wiki/Hosts_file (a full explanation)
http://practice.chatserve.com/hosts.html (a more practical guide)

Sometimes this trick is also used by anti-spyware programs, to make URLs of suspect sites unable to communicate with home.

MacRonin’s picture

Yup, Rusty hit the nail on the head. The Hosts file on your computer lets you override the normal DNS. Although in your case instead of 127.0.0.1 you would put the address of your sites TEST server 1.2.3.4

Thanks for finding the links to some doc Rusty, I just hadn't had the chance to dig it up.

-------------------
http://www.PrivacyDigest.com/ News from the Privacy Front (Drupal)
http://www.SunflowerChildren.org/ Helping children around the world ( Drupal)

cog.rusty’s picture

Are you using just the IP (http://xxx.xxx.xxx.xxx) or an account subdirectory too (http://xxx.xxx.xxx.xxx/~accountname)?

In the latter case try to set the RewriteBase to /~accountname in .htaccess (and remove the front # of course).

SamusFairchild’s picture

Ever spend many a frustrating hour trying to solve a problem using every method you can think of only to later realize that though you thought you tried one method, you apparently never actually uploaded that edited file?

...

Yep.
Needless to say, that worked.

Thanks for your help. :)

andrewbenkard’s picture

+1 fixed my problem. thanks.

jorisx’s picture

+1 nice, been pulling my hairs on this :)