diff --git a/docs/en/00_Getting_Started/01_Installation/03_Windows.md b/docs/en/00_Getting_Started/01_Installation/03_Windows.md
index 3cddfb1dd..31493254e 100644
--- a/docs/en/00_Getting_Started/01_Installation/03_Windows.md
+++ b/docs/en/00_Getting_Started/01_Installation/03_Windows.md
@@ -62,7 +62,9 @@ control.
3. Apache rewrite (mod_rewrite) isn't working and it's installed (prior to SilverStripe 3.1.11)
-Due to some changes to `mod_dir` in [Apache 2.4](http://httpd.apache.org/docs/current/mod/mod_dir.html#DirectoryCheckHandler) (precedence of handlers), index.php gets added to the URLs as soon as you navigate to the homepage of your site. Further requests are then handled by index.php rather than `mod_rewrite` (`main.php`). To fix this place the following within the `mod_rewrite` section of your .htaccess file:
+Due to some changes to `mod_dir` in [Apache 2.4](http://httpd.apache.org/docs/current/mod/mod_dir.html#DirectoryCheckHandler) (precedence of handlers),
+index.php gets added to the URLs as soon as you navigate to the homepage of your site.
+To fix this place the following within the `mod_rewrite` section of your .htaccess file:
```
diff --git a/docs/en/00_Getting_Started/01_Installation/05_Common_Problems.md b/docs/en/00_Getting_Started/01_Installation/05_Common_Problems.md
index 6b2d318e5..bafa3f60b 100644
--- a/docs/en/00_Getting_Started/01_Installation/05_Common_Problems.md
+++ b/docs/en/00_Getting_Started/01_Installation/05_Common_Problems.md
@@ -24,7 +24,6 @@ On "live" environments, the `?isDev=1` solution is preferred, as it means that y
Due to some changes to `mod_dir` in [Apache 2.4](http://httpd.apache.org/docs/current/mod/mod_dir.html#DirectoryCheckHandler)
(precedence of handlers), index.php gets added to the URLs as soon as you navigate to the homepage of your site.
-Further requests are then handled by index.php rather than `mod_rewrite` (`main.php`).
To fix this place the following within the `mod_rewrite` section of your .htaccess file:
```
diff --git a/docs/en/00_Getting_Started/01_Installation/How_To/Configure_Lighttpd.md b/docs/en/00_Getting_Started/01_Installation/How_To/Configure_Lighttpd.md
index 5d60a35d6..2de07d466 100644
--- a/docs/en/00_Getting_Started/01_Installation/How_To/Configure_Lighttpd.md
+++ b/docs/en/00_Getting_Started/01_Installation/How_To/Configure_Lighttpd.md
@@ -27,11 +27,11 @@ Silverstripe. Replace "yoursite.com" and "/home/yoursite/public_html/" below.
# Rewrite URLs so they are nicer
url.rewrite-once = (
"^/.*\.[A-Za-z0-9]+.*?$" => "$0",
- "^/(.*?)(\?|$)(.*)" => "/vendor/silverstripe/framework/main.php?url=$1&$3"
+ "^/(.*?)(\?|$)(.*)" => "/index.php?$3"
)
# Show SilverStripe error page
- server.error-handler-404 = "/vendor/silverstripe/framework/main.php"
+ server.error-handler-404 = "/index.php"
}
@@ -53,14 +53,14 @@ of Silverstripe on the same host, you can use something like this (be warned, it
url.rewrite-once = (
"(?i)(/copy1/.*\.([A-Za-z0-9]+))(.*?)$" => "$0",
"(?i)(/copy2/.*\.([A-Za-z0-9]+))(.*?)$" => "$0",
- "^/copy1/(.*?)(\?|$)(.*)" => "/copy1/vendor/silverstripe/framework/main.php?url=$1&$3",
- "^/copy2/(.*?)(\?|$)(.*)" => "/copy2/vendor/silverstripe/framework/main.php?url=$1&$3"
+ "^/copy1/(.*?)(\?|$)(.*)" => "/copy1/index.php?$3",
+ "^/copy2/(.*?)(\?|$)(.*)" => "/copy2/index.php?$3"
)
$HTTP["url"] =~ "^/copy1/" {
- server.error-handler-404 = "/copy1/vendor/silverstripe/framework/main.php"
+ server.error-handler-404 = "/copy1/index.php"
}
$HTTP["url"] =~ "^/copy2/" {
- server.error-handler-404 = "/copy2/vendor/silverstripe/framework/main.php"
+ server.error-handler-404 = "/copy2/index.php"
}
}
diff --git a/docs/en/00_Getting_Started/01_Installation/How_To/Configure_Nginx.md b/docs/en/00_Getting_Started/01_Installation/How_To/Configure_Nginx.md
index d9a247f82..35c499f21 100644
--- a/docs/en/00_Getting_Started/01_Installation/How_To/Configure_Nginx.md
+++ b/docs/en/00_Getting_Started/01_Installation/How_To/Configure_Nginx.md
@@ -30,7 +30,7 @@ But enough of the disclaimer, on to the actual configuration — typically in `n
}
location / {
- try_files $uri vendor/silverstripe/framework/main.php?url=$uri&$query_string;
+ try_files $uri index.php?$query_string;
}
error_page 404 /assets/error-404.html;
@@ -41,7 +41,7 @@ But enough of the disclaimer, on to the actual configuration — typically in `n
deny all;
}
sendfile on;
- try_files $uri vendor/silverstripe/framework/main.php?url=$uri&$query_string;
+ try_files $uri index.php?$query_string;
}
location ~ /framework/.*(main|rpc|tiny_mce_gzip)\.php$ {
diff --git a/docs/en/00_Getting_Started/01_Installation/How_To/Setup_Nginx_and_HHVM.md b/docs/en/00_Getting_Started/01_Installation/How_To/Setup_Nginx_and_HHVM.md
index f5b93a7c7..eab1096c4 100644
--- a/docs/en/00_Getting_Started/01_Installation/How_To/Setup_Nginx_and_HHVM.md
+++ b/docs/en/00_Getting_Started/01_Installation/How_To/Setup_Nginx_and_HHVM.md
@@ -48,7 +48,7 @@ Create `/etc/nginx/silverstripe.conf` and add this configuration:
fastcgi_buffers 4 32k;
location / {
- try_files $uri /vendor/silverstripe/framework/main.php?url=$uri&$query_string;
+ try_files $uri /index.php?$query_string;
}
error_page 404 /assets/error-404.html;
@@ -87,7 +87,7 @@ Create `/etc/nginx/silverstripe.conf` and add this configuration:
deny all;
}
-The above script passes all non-static file requests to `/framework/main.php` in the webroot which relies on
+The above script passes all non-static file requests to `/index.php` in the webroot which relies on
`hhvm.conf` being included prior so that php requests are handled.
Now in your nginx `server` configuration you can then include the `hhvm.conf` and `silverstripe.conf` files
diff --git a/docs/en/02_Developer_Guides/14_Files/03_File_Security.md b/docs/en/02_Developer_Guides/14_Files/03_File_Security.md
index 660f39b5e..a5795a7f6 100644
--- a/docs/en/02_Developer_Guides/14_Files/03_File_Security.md
+++ b/docs/en/02_Developer_Guides/14_Files/03_File_Security.md
@@ -362,7 +362,7 @@ bypasses PHP requests for files that do exist. The default template
# Non existant files passed to requesthandler
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
-RewriteRule .* ../vendor/silverstripe/framework/main.php?url=%1 [QSA]
+RewriteRule .* ../index.php [QSA]
```
You will need to ensure that your core apache configuration has the necessary `AllowOverride`
@@ -381,9 +381,9 @@ The default rule for IIS is as below (only partial configuration displayed):
-
+
-
+
```
@@ -402,6 +402,6 @@ dynamic requests are processed via the Framework:
```
location ^~ /assets/ {
sendfile on;
- try_files $uri vendor/silverstripe/framework/main.php?url=$uri&$query_string;
+ try_files $uri index.php?$query_string;
}
```
diff --git a/docs/en/02_Developer_Guides/16_Execution_Pipeline/03_App_Object_and_Kernel.md b/docs/en/02_Developer_Guides/16_Execution_Pipeline/03_App_Object_and_Kernel.md
index 930158066..1c1f785fe 100644
--- a/docs/en/02_Developer_Guides/16_Execution_Pipeline/03_App_Object_and_Kernel.md
+++ b/docs/en/02_Developer_Guides/16_Execution_Pipeline/03_App_Object_and_Kernel.md
@@ -65,56 +65,29 @@ The role of the application is to:
The HTTPApplication provides a specialised application implementation for handling HTTP Requests.
This class provides basic support for HTTP Middleware, such as [ErrorControlChainMiddleware](api:SilverStripe\Core\Startup\ErrorControlChainMiddleware).
-`main.php` contains the default application implementation.
+The `index.php` file in your project root contains the default application implementation.
+You can customise it as required.
```php
-
- use SilverStripe\Control\HTTPApplication;
- use SilverStripe\Control\HTTPRequestBuilder;
- use SilverStripe\Core\CoreKernel;
- use SilverStripe\Core\Startup\ErrorControlChainMiddleware;
-
- require __DIR__ . '/src/includes/autoload.php';
-
- // Build request and detect flush
- $request = HTTPRequestBuilder::createFromEnvironment();
-
- // Default application
- $kernel = new CoreKernel(BASE_PATH);
- $app = new HTTPApplication($kernel);
- $app->addMiddleware(new ErrorControlChainMiddleware($app));
- $response = $app->handle($request);
- $response->output();
-```
+
- # ...
- RewriteCond %{REQUEST_URI} ^(.*)$
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteRule .* mysite/main.php?url=%1 [QSA]
- # ...
-
+require __DIR__ . '/vendor/autoload.php';
+// Build request and detect flush
+$request = HTTPRequestBuilder::createFromEnvironment();
-Note: This config must also be duplicated in the below template which provide asset routing:
-
-`silverstripe-assets/templates/SilverStripe/Assets/Flysystem/PublicAssetAdapter_HTAccess.ss`:
-
-
-```ss
-
-
- # ...
- # Non existant files passed to requesthandler
- RewriteCond %{REQUEST_URI} ^(.*)$
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteRule .* ../mysite/main.php?url=%1 [QSA]
-
+// Default application
+$kernel = new CoreKernel(BASE_PATH);
+$app = new HTTPApplication($kernel);
+$app->addMiddleware(new ErrorControlChainMiddleware($app));
+$response = $app->handle($request);
+$response->output();
```
## Custom application actions
diff --git a/docs/en/02_Developer_Guides/16_Execution_Pipeline/index.md b/docs/en/02_Developer_Guides/16_Execution_Pipeline/index.md
index 9d249beab..29f9a3081 100644
--- a/docs/en/02_Developer_Guides/16_Execution_Pipeline/index.md
+++ b/docs/en/02_Developer_Guides/16_Execution_Pipeline/index.md
@@ -18,58 +18,10 @@ Check our [installation guides](/getting_started/installation) on how other web
The standard SilverStripe project ships with a `.htaccess` file in your webroot for this purpose.
By default, requests will be passed through for files existing on the filesystem.
Some access control is in place to deny access to potentially sensitive files in the webroot, such as YAML configuration files.
-If no file can be directly matched, control is handed off to `framework/main.php`.
+If no file can be directly matched, control is handed off to `index.php`.
- ### SILVERSTRIPE START ###
-
- # Deny access to templates (but allow from localhost)
-
- Order deny,allow
- Deny from all
- Allow from 127.0.0.1
-
-
- # Deny access to IIS configuration
-
- Order deny,allow
- Deny from all
-
-
- # Deny access to YAML configuration files which might include sensitive information
-
- Order allow,deny
- Deny from all
-
-
- # Route errors to static pages automatically generated by SilverStripe
- ErrorDocument 404 /assets/error-404.html
- ErrorDocument 500 /assets/error-500.html
-
-
- SetEnv HTTP_MOD_REWRITE On
- RewriteEngine On
-
- # Deny access to potentially sensitive files and folders
- RewriteRule ^vendor(/|$) - [F,L,NC]
- RewriteRule silverstripe-cache(/|$) - [F,L,NC]
- RewriteRule composer\.(json|lock) - [F,L,NC]
-
- # Non existant files passed to requesthandler
- # Try finding the module in the vendor folder first
- RewriteCond %{REQUEST_URI} ^(.*)$
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteRule .* ../vendor/silverstripe/framework/main.php?url=%1 [QSA]
-
- # If requesting the main script directly, rewrite to the installer
- RewriteCond %{REQUEST_URI} ^(.*)/framework/main.php$
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteRule . %1/install.php? [R,L]
-
-
- ### SILVERSTRIPE END ###
-
-SilverStripe can also operate without this level of rewriting, in which case all dynamic requests go
-through an `index.php` script in the webroot.
+SilverStripe can also operate without this level of rewriting, in which case
+you'll have `index.php` as part of the URL.
Running SilverStripe without web server based rewriting is not recommended since it
@@ -86,7 +38,7 @@ tasks silently in the background.
[configuration file](/getting_started/environment_management) in the webroot.
* Sets constants based on the filesystem structure (e.g. `BASE_URL`, `BASE_PATH` and `TEMP_PATH`)
-All requests go through `main.php`, which sets up the core [Kernel](api:SilverStripe\Core\Kernel) and [HTTPApplication](api:SilverStripe\Control\HTTPApplication)
+All requests go through `index.php`, which sets up the core [Kernel](api:SilverStripe\Core\Kernel) and [HTTPApplication](api:SilverStripe\Control\HTTPApplication)
objects. See [/developer_guides/execution_pipeline/app_object_and_kernel] for details on this.
The main process follows:
@@ -101,13 +53,12 @@ The main process follows:
While you usually don't need to modify the bootstrap on this level, some deeper customizations like
adding your own manifests or a performance-optimized routing might require it.
-An example of this can be found in the ["staticpublisher" module](https://github.com/silverstripe-labs/silverstripe-staticpublisher/blob/master/main.php).
-The modules instructs web servers to route through its own `main.php` to determine which requests can be cached
-before handing control off to SilverStripe's own `main.php`.
+An example of this can be found in the ["staticpublisher" module](https://github.com/silverstripe-labs/silverstripe-staticpublisher/).
## Routing and Request Handling
-The `main.php` script relies on [Director](api:SilverStripe\Control\Director) to work out which [controller](../controllers/) should handle this request. It parses the URL, matching it to one of a number of patterns,
+The `index.php` script relies on [Director](api:SilverStripe\Control\Director) to work out which [controller](../controllers/)
+should handle this request. It parses the URL, matching it to one of a number of patterns,
and determines the controller, action and any argument to be used ([Routing](../controllers/routing)).
* Creates a [HTTPRequest](api:SilverStripe\Control\HTTPRequest) object containing all request and environment information