php - Laravel 5 route using server -
i installed laravel 5 on ftp server. fine, main page enable. have problem routes. link calling route calling controller returning view.
my link :
<div class="logo"><a href="{{ route('accueil') }}"><img src="images/logo.png" alt=""></a></div>
my route :
route::get('/', [ 'as' => 'accueil', 'uses' => 'controllertest@accueil']);
my controller :
class controllertest extends controller { public function accueil() { return view('accueil'); } }
but when element, can see : href="http://xx.xxx.xx.xxxc:/test/public/index.php" instead of href="http://xx.xxx.xx.xxx/test/public/index.php"
it seems laravel mixing server's ip , localhost. can't find what's wrong. searched online solution, have issue.
there .htaccess file in /public folder
<ifmodule mod_rewrite.c> <ifmodule mod_negotiation.c> options -multiviews </ifmodule> rewriteengine on rewritebase /test # redirect trailing slashes... rewriterule ^(.*)/$ /$1 [l,r=301] # handle front controller... rewritecond %{request_filename} !-d rewritecond %{request_filename} !-f rewriterule ^ /index.php [l]
and there httpd.conf file used apache.
<virtualhost *:80> documentroot c:/htdocs rewriteengine on rewriteoptions inherit <directory "c:/htdocs"> allowoverride order allow,deny allow require granted </directory> </virtualhost>
and, have enable rewrite_module in same file (httpd.conf) :
loadmodule rewrite_module modules/mod_rewrite.so
i don't understand why can't work. if has idea me.
thanks reading.
Comments
Post a Comment