Conditions | 3 |
Paths | 2 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
16 | public function __construct(Request $request) |
||
17 | { |
||
18 | if (strpos($request->getURI(), 'index.php') || strpos($request->getURI(), 'index.html')) { |
||
19 | header('HTTP/1.0 301 Moved Permanently'); |
||
20 | $replaced_url = str_replace( |
||
21 | ['index.php/', 'index.php', 'index.html'], |
||
22 | ['', '', ''], |
||
23 | str_replace('?', '', $request->getURI()) |
||
24 | ); |
||
25 | header('Location: http://' . $request->getHttpHost() . $replaced_url); |
||
26 | exit(0); |
||
27 | } |
||
28 | } |
||
29 | |||
30 | } |