500 error -- laravel site

Status
Not open for further replies.

bdistler

Well-Known Member
Prime Account
Messages
3,534
Reaction score
196
Points
63
if [ Apache ] finds something in the [ .htaccess ] files it does not like - it throws a [ 500 Internal Server Error ]
you might need help by a Admin to find what the issue is

x10hosting's free-hosting accounts have no logs [ i.e. files ]
 

cifconav

New Member
Messages
9
Reaction score
0
Points
1
ok, if it is the .htaccess it figures I wander what could be

let me try playing around with the .htaccess file
 

brittbr2

Member
Messages
99
Reaction score
11
Points
8
Sometimes it becomes corrupt but you just need to add a new one and now your site is just giving a blank page
 

cifconav

New Member
Messages
9
Reaction score
0
Points
1
yes, this is my site .htaccess

RewriteEngine on
RewriteCond %{REQUEST_URI} !^laravel
RewriteRule ^(.*)$ laravel/$1 [L]

what is wrong with this
 

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
368
Points
83
Hi cifconav,

I took a peek in the server error logs to find what may be wrong with your .htaccess file, and it appears your .htaccess file is throwing the following error:
AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error.

This suggests that there may be a redirect loop caused by your current setup. However, the tutorial you are following appears to suggest using a different .htaccess file to the official Laravel documentation. The Laravel documentation suggests placing a .htaccess file with the following contents in the same directory as your public files:

Code:
<IfModule mod_rewrite.c>

<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>

RewriteEngine On

# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

</IfModule>

Could you try using this code instead and let me know how it goes? :)

Thank you,
 

brittbr2

Member
Messages
99
Reaction score
11
Points
8
Well best bet is to wait for a admin or community support member to help you
 

cifconav

New Member
Messages
9
Reaction score
0
Points
1
hello

thank you , so place this new .htaccess code under the public_html directory ? or under the public_html/laravel/ folder ?
since I am following that tutorial and it states to put the htaccess under the public_html



Hi cifconav,

I took a peek in the server error logs to find what may be wrong with your .htaccess file, and it appears your .htaccess file is throwing the following error:


This suggests that there may be a redirect loop caused by your current setup. However, the tutorial you are following appears to suggest using a different .htaccess file to the official Laravel documentation. The Laravel documentation suggests placing a .htaccess file with the following contents in the same directory as your public files:

Code:
<IfModule mod_rewrite.c>

<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>

RewriteEngine On

# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

</IfModule>

Could you try using this code instead and let me know how it goes? :)

Thank you,
.
 

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
368
Points
83
Hi cifonav,

It may be best to move all the files in your "laravel" directory directly into "public_html", as they do not need to be in a subfolder. Then, you can place that .htaccess in your public_html directory with the rest of the files. ;)

Thank you,
 

cifconav

New Member
Messages
9
Reaction score
0
Points
1
ok let me try that




Hi cifonav,

It may be best to move all the files in your "laravel" directory directly into "public_html", as they do not need to be in a subfolder. Then, you can place that .htaccess in your public_html directory with the rest of the files. ;)

Thank you,
 

cifconav

New Member
Messages
9
Reaction score
0
Points
1
Ok, moved all of the laraval public folder under the public_html folder and now while I do not get a 500 error I do get a blank page .
anything in the logs ?

thank you
 

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
368
Points
83
Hi cifconav,

I made two modifications to your index.php file, as they were looking for files in the wrong location, and your site now appears to be loading fine. If you are still seeing the blank page, this may be due to our cache server and you should see your page in a few minutes. :)

Thank you,
 

cifconav

New Member
Messages
9
Reaction score
0
Points
1
Ok, got it guys, I guess this is the best way to setup Laravel on this free hosting
 

cifconav

New Member
Messages
9
Reaction score
0
Points
1
do you know what you change on the index.php since I did also a modification on my paths.php configuration on laravel
 

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
368
Points
83
Hi,

The only things I changed were the paths to the two files that are included, which was autoload.php and start.php, so that they pointed to the correct place.

For example, I changed
require __DIR__.'/../bootstrap/autoload.php';
to
require __DIR__.'/../main-laravel/bootstrap/autoload.php';

Thank you,
 
Status
Not open for further replies.
Top