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

SOLVED: Issues with subfolders and /

apache

Started by Mattias Magnusson 9 years ago · 0 replies · 1582 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 Jerry Hunt, 4 days ago
2 74 6 hours ago
General · by pamtbaau, 11 hours ago
1 47 11 hours ago
General · by Andy Miller, 23 hours ago
0 43 23 hours ago
General · by Marcel, 12 months ago
6 346 5 days ago
General · by Duc , 5 days ago
3 39 5 days ago