Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

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

Started by paul 6 years ago · 3 replies · 852 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 jeremycherfas, 7 days ago
1 110 7 days ago
Installation & Hosting · by motorambler, 3 weeks ago
8 392 2 weeks ago
Installation & Hosting · by antoinep, 3 months ago
8 963 3 months ago
Installation & Hosting · by Jürgen Dietrich, 10 months ago
0 622 10 months ago
Installation & Hosting · by rappluk, 11 months ago
0 667 11 months ago