Esempio n. 1
0
 public function generateRobots()
 {
     if (App::environment() == 'production') {
         Robots::addUserAgent('*');
         Robots::addDisallow('/konto');
         Robots::addDisallow('/*/szukaj');
         Robots::addSitemap('/sitemap.xml');
     } else {
         Robots::addUserAgent('*');
         Robots::addDisallow('*');
     }
     return Response::make(Robots::generate(), 200, array('Content-Type' => 'text/plain'));
 }
Esempio n. 2
0
    	    return Redirect::to('http://'.env('WEB'), 301); 
    	});*/
    Route::get('/', 'PagesController@index');
    foreach (Lang::get('routes') as $k => $v) {
        Route::pattern($k, $v);
    }
    Route::get('/{seo}/', 'PagesController@seo');
    Route::get('/{programming}/', 'PagesController@programming');
    Route::get('/{design}/', 'PagesController@design');
    Route::get('/{services}/', 'PagesController@services');
    Route::get('/{contacts}/', 'PagesController@contacts');
    Route::post('send-mail', 'PagesController@sendMail');
    Route::get('sitemap', 'SitemapsController@index');
    Route::get('sitemap.xml', 'SitemapsController@index');
} elseif ($routing_schema == 'homepage') {
    Route::get('/', 'PagesController@home');
    Route::post('send-mail', 'PagesController@sendMail');
    Route::get('sitemap', 'SitemapsController@indexSingle');
    Route::get('sitemap.xml', 'SitemapsController@indexSingle');
}
Route::get('robots.txt', function () {
    if (App::environment() == 'production') {
        // If on the live server, serve a nice, welcoming robots.txt.
        Robots::addUserAgent('*');
        Robots::addSitemap('sitemap');
    } else {
        // If you're on any other server, tell everyone to go away.
        Robots::addDisallow('*');
    }
    return Response::make(Robots::generate(), 200, ['Content-Type' => 'text/plain']);
});