in the config/application.php just change the static url or the empty one to the following
which detect the right url for you and for your application function in use like redirect
<?php
if (empty($_SERVER['SCRIPT_NAME']) || $_SERVER['SCRIPT_NAME'] == "artisan") {
$url = 'http://www.mydomain.com';
} else {
$url = 'http://' . $_SERVER['HTTP_HOST'] . str_replace('/index.php', '', $_SERVER['SCRIPT_NAME']);
}
return array(
/*
|--------------------------------------------------------------------------
| Application URL
|--------------------------------------------------------------------------
|
| The URL used to access your application without a trailing slash. The URL
| does not have to be set. If it isn't, we'll try our best to guess the URL
| of your application.
|
*/
'url' => $url,
and leave the rest of the file as is it