Laravel .htaccess error when uploaded to the host -


your .htaccess file this

<ifmodule mod_rewrite.c> <ifmodule mod_negotiation.c> options -multiviews </ ifmodule> rewriteengine on # redirect trailing slashes if not folder ... rewritecond% {request_filename}! -d rewriterule ^ (. *) / $ / $ 1 [l, r = 301] # handle front controller ... rewritecond% {request_filename}! -d rewritecond% {request_filename}! -f rewriterule ^ index.php [l] # handle authorization header rewritecond% {http: authorization}. rewriterule. * - [e = http_authorization:% {http: authorization}] </ ifmodule> 

somehow hosts 500 internal server error

the correct .htaccess should this:

<ifmodule mod_rewrite.c>   <ifmodule mod_negotiation.c>     options -multiviews   </ifmodule>   rewriteengine on   # redirect trailing slashes if not folder ...   rewritecond %{request_filename}! -d   rewriterule ^(.*)/$/$1 [l,r=301]   # handle front controller ...   rewritecond %{request_filename}! -d   rewritecond %{request_filename}! -f   rewriterule ^ index.php [l]   # handle authorization header   rewritecond %{http: authorization}.   rewriterule .* - [e=http_authorization:%{http:authorization},l] </ifmodule> 

you had many spaces in rules broke them. don't add spaces improve readability.

ps: use .htaccess validator www.htaccesscheck.com in future , try resolve shown problems.


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo