Forum

Rewrite rule for Laravel 4

RaGe10940
15 December 2013, 17:20
Hello Hugo (and others),

Today was having issues with my routes and finally realized to serve the pages I had to include that /index.php/ after my domain. So I wrote up a very basic rewrite rule that does indeed work with Laravel (as per routing and what not) and hiawatha.
UrlToolkit {
ToolkitID = laravel
RequestURI exists Return
Match .* Rewrite /index.php
}

before:
External image via http://i.imgur.com/aqvQyPg.png


after :
External image via http://i.imgur.com/k1Cp8IF.png



Now I don't know the security risks behind the rewrite rule so consult with Hugo for any questions. For me this is a learning environment not production.

Hiawatha version: 9.3
Operating System: Lubuntu 13.10
Hugo Leisink
18 December 2013, 08:57
There is no security risk. The UrlToolkit can only rewrite to another file within the same virtual host. That other file can also be requested by using a URL that directly points to it.
This topic has been closed.