Jump to:

546 Posts in 2222 Topics by 237 members

Hosting Requirements

SilverStripe Forums » Hosting Requirements » problem on bluehost

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

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

Page: 1
Go to End
Author Topic: 2537 Views
  • CriaturaCreativaStudio
    Avatar
    Community Member
    73 Posts

    problem on bluehost Link to this post

    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

  • UncleCheese
    Avatar
    4085 Posts

    Re: problem on bluehost Link to this post

    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.

  • CriaturaCreativaStudio
    Avatar
    Community Member
    73 Posts

    Re: problem on bluehost Link to this post

    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

  • CriaturaCreativaStudio
    Avatar
    Community Member
    73 Posts

    Re: problem on bluehost Link to this post

    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

  • rpw2
    Avatar
    Community Member
    6 Posts

    Re: problem on bluehost Link to this post

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

    2537 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.