//D:/website/zbphp.com/www/Laravel/app/routes.phpRoute::group(array('prefix'=>'admin'),function(){ Route::get('login','admin\HomeController@login');});
http://localhost/ADMIN/LOGIN/error when URL is not accessible
How case insensitive
Reply content:
//D:/website/zbphp.com/www/Laravel/app/routes.phpRoute::group(array('prefix'=>'admin'),function(){ Route::get('login','admin\HomeController@login');});
http://localhost/ADMIN/LOGIN/error when URL is not accessible
How case insensitive
Force the route URL to all lowercase, in the main portal file server.php inside can be manipulated.
@kankana, Suit!
There's no good way to do this.
Well, you define route using pattern.
Refer here Http://stackoverflow.com/questions/21731151/laravel-case-insensitive-routes
Yes, you want LS to say, convert to lowercase.
The correct file to handle this kind of thing is app/filters.php rather than server.php (more than a portal file).
App::before(function($request){ $fullUrl = $request->fullUrl(); if(preg_match('@[A-Z]@', $fullUrl)) return Redirect::to(Str::lower($fullUrl));});
Another way to do this is to convert the case when the error occurs.
This is app/start/global.php.
App::error(function(Symfony\Component\HttpKernel\Exception\NotFoundHttpException $exception, $code){ $fullUrl = Request::fullUrl(); if(preg_match('@[A-Z]@', $fullUrl)) return Redirect::to(Str::lower($fullUrl));});
In fact, both of these methods are the next worst.
And why do I say server.php is not a portal file?
Because this is PHP's internal Web server, for details you can refer to, I will not say more.
Http://stackoverflow.com/questions/16919920/what-is-the-purpose-of-the-server-php-file-in-laravel-4
If you use Apache/nginx to run Laravel, you must point to public/index.php, not server.php. So if you say to LS that it is not possible to modify these operations directly in server.php, in a production environment (Nginx/apache).
By the way, artisan serve
this command can start PHP's internal Web server, when server.php is the portal file.
This command file illuminate\foundation\console\servecommand.php
passthru('"'.PHP_BINARY.'"'." -S {$host}:{$port} -t \"{$public}\" server.php");
Extend Router class Rewrite This method should be possible.
protected function Addroute ($methods, $uri, $action)
{
return $this->routes->add ($this->createroute ($methods, Strtolower ($uri), $action));
}