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