Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

SOLVED: Issues with subfolders and /

apache

Started by Mattias Magnusson 9 years ago · 0 replies · 2152 views
9 years ago

Hi, so basically i got a page setup where i got a service to my page that has nothing to do with grav, except
the url for my service is /subfolder or /subfolder/

here is the issue: when i should access my service i have to go to: myurldotcom/subfolder/
And this is what i wan't to do: myurldotcom/subfolder

And my result should be the same, but when i do access "myurldotcom/subfolder" i get a grav 404 message instead.
how do i solve this?
i did use Alias in apache httpd.conf like this:

Alias "/subfolder/" "drive:/folder/folder/"
Alias "/subfolder" "drive:/folder/folder/"

but my issue is that my application can't work properly with both of those aliases.
is there any thing i can configure in grav to redirect to /subfolder/ instead of using /subfolder and echo 404? Thanks!

SOLVED:
added this to my .htaccess
RewriteCond %{REQUEST_URI} subfolder
RewriteRule ^ /subfolder/ [L,R]

last edited 10/07/17 by Mattias Magnusson

Suggested topics

Topic Participants Replies Views Activity
General · by Hanns Mattes, 6 days ago
0 89 6 days ago
General · by Dima, 1 week ago
1 116 1 week ago
General · by pamtbaau, 2 weeks ago
0 188 2 weeks ago
General · by lynbor, 2 months ago
5 698 4 weeks ago
General · by Andy Miller, 1 month ago
0 419 1 month ago