laravelnewbie laravelnewbie - 12 days ago 6
PHP Question

How To Fix The Internal Error 500 When Using Laravel (Shared Hosting)

I'm a newbie to laravel. I'm getting an internal error 500 when I go to mydomain.com.

My error log says:

[Sun Nov 20 22:04:48.310309 2016] [core:alert] [pid 364784:tid 140380089542400] [client 141.101.105.69:27886] /public_html/public/.htaccess: <IfModule> directive requires additional arguments


I found this thread which sounds like my problem; Laravel blank white screen

But I'm on shared hosting and do not have SSH access. How can I execute this fix on shared hosting?

Thanks!

Answer

It looks like you have a blank IfModule directive in your .htaccess. You need to update it to state which module it is querying for the existence of. See: http://httpd.apache.org/docs/2.4/mod/core.html#ifmodule

Or post your .htaccess for help.

For example, to define a block in your .htaccess that only applied if the php module is loaded on the server, you might use:

<IfModule mod_php5.c>

Alternatively, if it is the closing directive, then you are missing a forward slash and need to change it to:

</IfModule>

Ref: error 500 for .htaccess error Ref: http://serverfault.com/questions/257986/error-500-for-htaccess-error

Comments