Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Hosting Requirements

What you need to consider when choosing a hosting provider and plan.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

problem on bluehost


Reply

5 Posts   2631 Views

Avatar
CriaturaCreativaStudio

9 April 2009 at 2:06pm Community Member, 73 Posts

Hello there,

I've used SS on bluehost succesfully.
The problem i have know is that my "main domain" sits on the "public_html" folder...
Al other subdomains, have their own folder below "public_html"

public_html (main domain)
-----photodpto (new folder for the "main" domain, that was sitting on public_html)
-----domain2
-----domain3 and so...

To organize more the structures of files and folders, i'm using a bluehost htaccess file, placed on the public_html folder. This file treats a new folder (such as domain2 or domain3) as the place to work with main domain (wich sits on public_html)
It's a redirect, in this way, i can place my files there, and don't mix up, for instance, silverstripe installation with all the other domain folders (domain2, domain3).

The .htaccess file content is:

# Bluehost.com
# .htaccess main domain to subfolder redirect
# Copy and paste the following code into the .htaccess file
# in the public_html folder of your hosting account
# make the changes to the file according to the instructions.

# Do not change this line.

RewriteEngine on

# Change yourdomain.com to be your main domain.

RewriteCond %{HTTP_HOST} ^(www.)?photodpto.com$

# Change 'subfolder' to be the folder you will use for your main domain.

RewriteCond %{REQUEST_URI} !^/photodpto/

# Don't change this line.

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Change 'subfolder' to be the folder you will use for your main domain.

RewriteRule ^(.*)$ /photodpto/$1

# Change yourdomain.com to be your main domain again.
# Change 'subfolder' to be the folder you will use for your main domain
# followed by / then the main file for your site, index.php, index.html, etc.

RewriteCond %{HTTP_HOST} ^(www.)?photodpto.com$
RewriteRule ^(/)?$ photodpto/ [L]

All looks good with the redirect, i can install the SS software without any problems.
Once the installation was finished, i've noticed that the url structure is messed up, seems like SS installation is noticing the original directory structures... so my urls look like this:

http://www.photodpto.com/photodpto/about-us/ instead of http://www.photodpto.com/about-us/

The aesthetic part is not a big problem, the problem starts that when i want to log in, my user doesn't exists, and i'm suspecting that this has something to do with the redirect.

The .htaccess of the /photodpto folder (the new ss installation) looks like this:

### SILVERSTRIPE START ###
<Files *.ss>
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Files>

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /photodpto

RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$

RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
</IfModule>
### SILVERSTRIPE END ###

It's weird the RewriteBase line, i don't understand almost nothing about Apache, but ive noticed that other "correct" installations, just put there a slash...

The question is, if there is an easy solution on the .htaccess file for SS installation, to stop mapping the additional folder, that i think that is messing up the rest of things....

I would love to get any feedback for this, thank you in advance...

Eduardo

Avatar
UncleCheese

9 April 2009 at 3:52pm 4085 Posts

Yup! I had this exact problem with a client who hosted with Bluehost. Drove me nuts. And their support doesn't have a clue. You might as well ask your dog for advice.

Good luck. I was thoroughly unimpressed with that hosting. Please let me know if you figure it out so my client can get out of the /silverstripe/about-us business.

Avatar
CriaturaCreativaStudio

10 April 2009 at 6:07am Community Member, 73 Posts

too bad to hear that...
Actually the problem is that additional subfolder that causes trouble on the urls and installation...
I think that someone that has idea about Apache could easily find a workaround to that, but unfortunatelly that's not my case, i'm a designer and photographer... :(

Let's hope that somebody can help me...

thanks for your reply

eduardo

Avatar
CriaturaCreativaStudio

14 April 2009 at 6:31am Community Member, 73 Posts

any ideas on how to tweak the .htaccess from the site to make the urls work properly?
The main problem is that i cannot access to the CMS to change contents or so.... when i enter user and password, the system says that i'm logged but i cannot acces the interface....

HELPPPPPPPPPPPPPPPPPPPPP

:(

Eduardo

Avatar
rpw2

29 June 2009 at 11:49pm Community Member, 6 Posts

Hi there, did you sort this problem out? was it .htaccess issue? Thanks.