Skip to content
Grav 2.0 is officially stable. Read the announcement →
General

I would like to run grav in a subdirectory of public_html on siteground

Started by Norma White 9 years ago · 1 replies · 700 views
9 years ago

I have tried to write .htaccess to access it.
So www.nhbpeterborough.com/carrytwo works perfectly.
But .htaccess writtten as documented at siteground failed to find the application for nhbpeterborough.com.
Support at siteground made several attempts to do the redirection and failed.

Finally, in response to my ticket they say
"It seems that your application rewrites the urls to the sub-folder and causing a redirect loop when trying to mask the carrytwo in the URL bar."

I see that GRAV has a complex .htaccess in its own root.
Siteground recommends creating .htaccess in public_html containing the following
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?nhbpeterborough.com$
RewriteCond %{REQUEST_URI} !^/nhbpeterborough.com/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /carrytwo/$1

RewriteCond %{HTTP_HOST} ^(www.)?nhbpeterborough.com$
RewriteRule ^(/)?$ carrytwo/index.php [L]

This is what creates the loop referred to above.

Might it be possible to have a .htaccess in public_html that combined GRAVs requests with this? Or any suggested solution?

Thanks
Norma

Thanks
Norma

9 years ago

I fixed this myself by making the subdirectory a subdomain and redirecting to it.
Norma

Suggested topics

Topic Participants Replies Views Activity
General · by jean-louis67, 3 weeks ago
2 308 3 weeks ago
General · by Andy Miller, 3 weeks ago
0 310 3 weeks ago
General · by Veehem, 4 weeks ago
0 263 4 weeks ago
General · by milkboy, 4 weeks ago
0 264 4 weeks ago
General · by ian russell, 1 month ago
2 335 1 month ago