I'm running Drupal 6 and have been developing a (second) website on my local machine until yesterday when I migrated it to a shared host. Everything is running well now after I made a few tweaks. BUT now I need to append /index.php to the URL to access the front page, it has stumped me. I can't just use 192.168.0.1/~username/ like I did on my local machine.
What I see if I just enter the URL (with no index.php at the end) is a white page with all the text and links that should be on the front page, but no images, blocks or structure.
In .htaccess I have DirectoryIndex index.php which I think is right and in settings.php I don't have any base URL set but I have tried changing it to no avail.
Any ideas on how I get '192.168.0.1/~username/' to work as opposed to '192.168.0.1/~username/index.php'?
Comments
I still can't find a solution
I still can't find a solution after trying for several hours. I've checked that the .htaccess file works, which for redirects it does seem to, but it doesn't give an error when I put garbage in it.
I'm with EZPZ hosting and they use a linux server with Litespeed.
The site works perfectly if I put index.php at the end of the URL in my browser and I can navigate around and log in but when I click on any links to it takes me to 192.168.0.1/~username/ which doesn't work.
Ideally I'd like to be able to omit index.php.
Any Ideas?
Regards,
Alpaca
.htaccess
Did you copy .htaccess accross to the shared hosting.
It contains the line
Which sets index.php to load automatically. Perhaps you host doesn't support it.
Try putting a index.html / index.htm file in to see if that load automatically
Peter J Lord
http://peterjlord.co.uk
Yes I copied it across with
Yes I copied it across with the site, I knew to do this because I missed it with the first site I made and it took me a while to figure out what was wrong.
I have just been trying out DirectoryIndex index.html as you said and it loads fine...
Curious.
What is stopping the index.php then? I know my host has PHP 5.
Thanks for the help so far. What's the next step?
Regards,
Alpaca
I have sent a support ticket
I have sent a support ticket to EZPZ hosting. I will update the thread when they get back to me.
I suspect that they have restricted the .htaccess file too much.
Regards,
Alpaca
Setting the Record Straight
In case anyone else has the same issue in future:
The problem was due to us using a temporary domain name (ie. 192.168.0.1/~user/). Now the proper domain name has resolved (ie. www.example.com) we can use it and all is all working perfectly.
To give credit to EZPZ I sent two tickets to them and both were fixed very quickly. I'm impressed so far.
Regards,
Alpaca
cannot access directly
I think I have the same problem as the first issue...
the problem happening to me is this: to access the my site I have to type "www.example.com/example" instead of just typing "www.example.com". I'm new to the hosting thing so I don't know how to fix this.
Anyone have an idea? thanks in advance!
regards,
pierre