php - Laravel 5 .htaccess url public remove not working -
i using laravel 5 default directory structure. removing public folder url using following code in .htaccess
<ifmodule mod_rewrite.c> rewriteengine on rewriterule ^(.*)$ public/$1 [l] </ifmodule>
i using xampp , path http://localhost/pro/laravel5/public
so project in htdocs/pro/laravel5/ here have kept above .htaccess else default
when try access project following error.
notfoundhttpexception in routecollection.php line 145:
in routecollection.php line 145 @ routecollection->match(object(request)) in router.php line 719 @ router->findroute(object(request)) in router.php line 642 @ router->dispatchtoroute(object(request)) in router.php line 618 @ router->dispatch(object(request)) in kernel.php line 210 @ kernel->illuminate\foundation\http\{closure}(object(request)) @ call_user_func(object(closure), object(request)) in pipeline.php line 141 @ pipeline->illuminate\pipeline\{closure}(object(request)) in verifycsrftoken.php line 43 @ verifycsrftoken->handle(object(request), object(closure)) in verifycsrftoken.php line 17 @ verifycsrftoken->handle(object(request), object(closure)) in pipeline.php line 125 @ pipeline->illuminate\pipeline\{closure}(object(request)) in shareerrorsfromsession.php line 55 @ shareerrorsfromsession->handle(object(request), object(closure)) in pipeline.php line 125 @ pipeline->illuminate\pipeline\{closure}(object(request)) in startsession.php line 61 @ startsession->handle(object(request), object(closure)) in pipeline.php line 125 @ pipeline->illuminate\pipeline\{closure}(object(request)) in addqueuedcookiestoresponse.php line 36 @ addqueuedcookiestoresponse->handle(object(request), object(closure)) in pipeline.php line 125 @ pipeline->illuminate\pipeline\{closure}(object(request)) in encryptcookies.php line 40 @ encryptcookies->handle(object(request), object(closure)) in pipeline.php line 125 @ pipeline->illuminate\pipeline\{closure}(object(request)) in checkformaintenancemode.php line 42 @ checkformaintenancemode->handle(object(request), object(closure)) in pipeline.php line 125 @ pipeline->illuminate\pipeline\{closure}(object(request)) @ call_user_func(object(closure), object(request)) in pipeline.php line 101 @ pipeline->then(object(closure)) in kernel.php line 111 @ kernel->sendrequestthroughrouter(object(request)) in kernel.php line 84 @ kernel->handle(object(request)) in index.php line 53
how can solve suggestion, missing things in .htaccess let me know. , don't want use second option of moving files , folder.
hey way have copy .htaccess , index file root path in htaccess file use public
<ifmodule mod_rewrite.c> rewriteengine on rewriterule ^(.*)$ public/$1 [l] </ifmodule>
then index.php thtz :)
require __dir__.'/laravel5/bootstrap/autoload.php'; , $app = require_once __dir__.'/laravel5/bootstrap/app.php';
Comments
Post a Comment