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.

Installation & Hosting

.htaccess rewrite if address includes /grav/ subdirectory in path?

Started by paul 6 years ago · 3 replies · 699 views
6 years ago

My grav install is in a subdirectory of my web root. The web root's .htaccess redirects mysite.com/foo traffic to mysite.com/grav/foo, while the address bar in the browser continues to just show mysite.com/foo. All good.

But I can still enter mysite.com/grav/foo in the address bar, and the 'foo' page loads, while the address bar continues to show /grav/ in its path. That's

Is there a way to change this without changing the default .htaccess in /grav/ ?

6 years ago

I would like to avoid altering the .htaccess of the grav installation itself to maintain the way grav allows us to only tend to the grav/user folder.

And as a user of shared hosting, I don't have access to apache vhost config.

So without finding a solution to my issue, I've added an issue on github.

6 years ago

I'm a little confused with what your saying/asking.

Do you only want visitors to be able to see mysite.com/foo even if the go directly to mysite.com/grav/foo

👍 1
6 years ago

Hi, thanks for replying. Yes, that's exactly right.

Suggested topics

Topic Participants Replies Views Activity
Installation & Hosting · by antoinep, 13 hours ago
5 60 7 hours ago
Installation & Hosting · by Jürgen Dietrich, 7 months ago
0 62 7 months ago
Installation & Hosting · by rappluk, 8 months ago
0 62 8 months ago
Installation & Hosting · by N, 12 months ago
3 72 12 months ago
Installation & Hosting · by Youle, 1 year ago
1 61 1 year ago