mirror of
https://github.com/silverstripe/silverstripe-installer
synced 2024-10-22 17:05:33 +02:00
Disable trailing slash redirect for dirs
If you're running mod_dir on Apache, and create a route which matches a directory name (such as 'framework'), "GET /framework" will result in a 301 to "/framework/?url=framework". While the SilverStripe routing might decide to enforce trailing slash rules later, Apache shouldn't have any business here. The specific bug this fixes was redirecting "/graphql" to "/graphql/", with the silverstripe/graphql module installed. See https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryslash
This commit is contained in:
parent
a4d886e9d4
commit
63948d8064
@ -35,6 +35,7 @@ ErrorDocument 500 /assets/error-500.html
|
|||||||
# Turn off index.php handling requests to the homepage fixes issue in apache >=2.4
|
# Turn off index.php handling requests to the homepage fixes issue in apache >=2.4
|
||||||
<IfModule mod_dir.c>
|
<IfModule mod_dir.c>
|
||||||
DirectoryIndex disabled
|
DirectoryIndex disabled
|
||||||
|
DirectorySlash Off
|
||||||
</IfModule>
|
</IfModule>
|
||||||
|
|
||||||
SetEnv HTTP_MOD_REWRITE On
|
SetEnv HTTP_MOD_REWRITE On
|
||||||
|
Loading…
Reference in New Issue
Block a user