Guys, I know this is a topic widely discussed, but there are many variations of possible configurations that vary from provider to provider, and all I've tested so far have not worked.
I changed my Drupal 6 site to a dedicated server in hivelocity.net. It is an excellent provider, but their support is not helping me solve this problem.
This setup worked in previous provider (InmotionHosting). Was made a migration extatamente equal to HyVelocity and now no longer works.
Here the problem:
Our site (mysite.com) has always been located in the subfolder /public_html/my_subfolder.
The problem is that in HyVelocity.net, the URLs that are being generated with an additional “/my_subfolder” at the end. For mysite, a correct URL should be “http://mysite.com/some_link”. But in HyVelocity.net is being generated in the URL “http://mysite.com/my_subfolder/some_link”. This happens to ALL links.
The curious thing is that this happens only in the MAIN DOMAIN: mysite.com. With our SUBDOMAINS this problem don't occur.
For example:
1) I access “http://mysite.com”;
2) I click on the first link our main menu (home)
3) As result I will get "http://mysite.com/my_subfolder/". The correct should be just “http://mysite.com”;
4) Now I access one of our SUBDOMAIN, for mysite “http://abc.mysite.com/” and do the same;
5) I will see that in a subdomain, it will not add "/my_subfolder" at the end. It only occurs with the main domain.
I have analyzed the file “.htaccess”, both in the “/public_html/my_subfolder” (our site folder) and in “/public_html” folder.
These “.htaccess” are EXACTLY as they were at another provider, where we had exactly what I have in HyVelocity.net: cpanel, php, mysql, ....
Could anyone help me?
For clarity, here a link to see 3 files to analyze (http://www.mediafire.com/?27okpzy9b3puker):
- htaccess(public_html): the .htaccess file located on /public_html folder
- htaccess(my_subfolder): the .htaccess file located on /public_html/my_subfolder
- settings.php
Some considerations:
In both .htacess files, there is a "suPHP_ConfigPath" line. It's from our last provider (InmotionHosting). But I don't know if the solution is here. But I think that this is not installed on HyVelocity.net. Could be the solution?
Thanks in advance.
Comments
=-=
anything in .htaccess from old host should likely be removed.
is there a rewrite base set in .htaccess?
Thanks for your reply, but I
Thanks for your reply, but I really do not understand almost nothing of htaccess. Could you please take a look at the files I sent the link above?
=-=
check the rewritebase line in the .htaccess file - perform a CTRL-F and search the contents of the file for the aforementioned setting. Or download a new D6 core and extract the .htaccess file from it.
where did the .htaccess file in the public root come from, if all sites are in subfolders? If from the host, have you backed it up, then removed it and tested?
if you want someone to look at the files then use pastebin or drupalbin
Thanks for the tips. All
Thanks for the tips.
All these 3 files came from InMotionHosting. I didn't make any changes, because there our site was working.
=-=
you've switched hosts. Unless the hardware and software is exactly the same and configured in exactly the same way and therefore providing the same exact environment there are no guarantees that what worked on one host will work on another.
You've already been given some debug information that should be worked through.
back up the files in question
remove old hosts additions
test
remove the .htaccess in root (as this isn't from the new host)
test
if you need a new copy of .htaccess you can obtain it from a new download of Drupal 6.x
Thanks again. Once my site is
Thanks again.
Once my site is located on a subfolder, if I remove the .htaccess file from root (this file redirects to the subfolder), my site won't work.
Is this any way to change the root folder in cPanel or WHM to /public_html/my_subfolder?
=-=
There should be and your host documentation should describe how to accomplish that task.