#1 September 12, 2017 11:16pm

ninjaweb
Member
Registered: September 12, 2017
Posts: 2

Change root /site/ folder

I just installed BigTree for the first time. I want the files to be in my site's root folder, but the installation creates a folder called /site/ and the www_root gets set as http://www.mydomain.com/site/index.php/. How can I change this so that the homepage is just http://www.mydomain.com? I tried moving the files out of /site/ and into the root folder, but that just broke everything.

Am I missing something? Should there be an .htaccess file that redirects it for me? I have been searching for the answer for awhile now, and I feel like I am probably missing something simple and obvious but don't know what.

Thanks in advance for any help.

Offline

#2 September 13, 2017 10:36am

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 974

Re: Change root /site/ folder

You need to use either "Simple Rewrite Routing" or "Advanced Routing" when installing to get clean URLs. The "Basic Routing" mode is for servers that do not support URL rewrites which forces all pages through /site/index.php/.

Offline

#3 September 13, 2017 10:54am

ninjaweb
Member
Registered: September 12, 2017
Posts: 2

Re: Change root /site/ folder

How can I change which routing method I am using after installation? I chose Basic Routing during installation, but I can't find any settings in the admin area to change that now. I know that I could change the setting in the environment.php file, but I don't know what my options to change it to are.  I found a small amount of information about it in the documentation, but it didn't show the different options.
I found:
$bigtree["config"]["routing"]
The routing mode that's engaged in the site. If this is set to "basic", BigTree's /site/install.php will behave differently (for servers that don't support rewrites).

Offline

#4 September 13, 2017 10:57am

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 974

Re: Change root /site/ folder

You'll need to add .htaccess files to both your root directory and your /site/ directory, change your $bigtree["config"]["www_root"] variable in /custom/environment.php (to drop /site/index.php/), and update $bigtree["config"]["routing"] to "htaccess".

The root .htaccess should look like this:

RewriteEngine On
RewriteRule ^$ site/ [L]
RewriteRule (.*) site/$1 [L]

The /site/.htaccess file should look like this:

IndexIgnore */*

Options -MultiViews

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?bigtree_htaccess_url=$1 [QSA,L]

RewriteRule .* - [E=HTTP_IF_MODIFIED_SINCE:%{HTTP:If-Modified-Since}]
RewriteRule .* - [E=HTTP_BIGTREE_PARTIAL:%{HTTP:BigTree-Partial}]

Offline

Board footer

Powered by FluxBB

The Discussion Forum is not available on displays of this size.