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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

General

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

Started by Norma White 9 years ago · 1 replies · 568 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 Jerry Hunt, 4 days ago
2 95 15 hours ago
General · by pamtbaau, 20 hours ago
1 61 19 hours ago
General · by Andy Miller, 1 day ago
0 47 1 day ago
General · by Marcel, 12 months ago
6 356 5 days ago
General · by Duc , 6 days ago
3 44 6 days ago