Why website not see although custom domain and all project files upload

I upload all laravel project file into htdocs and my domain is custom domain,
I also set .htaccess correctly.
when I enter url , cannot see website.


what wrong

No info = everything wrong

1 Like

Hello, since you did not provide anything that we can use to assist you, the only thing I can suggest is that you clear your cache.

Thanks

2 Likes

Laravel by default places the web accessible content in the public folder, and doesn’t have an index.php file in the base directory. So if you try to open the base directly, and haven’t deleted the index2.html file, the server will just load that instead.

You can verify your website works by navigating to http:// (your domain) /public/.

If it does, you can configure your website to redirect to it. This StackOverflow answer provides a few suggestions:

1 Like


.htaccess is

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

custom domain is learnerschool.site

plz check

Oops! error 500! http://learnerschool.site/public/

Create an index.php in /htdocs folder, and put this content in the file and save it!

<?php 
header("Location: http://learnerschool.site/public/")
?>
1 Like

not work, I dont know why ,I checked all,
.htacess

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

cannot read public folder index.php.
what wrong.

Use this instead:

Redirect 301 / http://learnerschool.site/public/

Also, it looks like your site has a different issue at the moment.

1 Like

I made similar issue by subdomain , it is work by .htacess customization, when I try with custom domain , it not work. never read index.php .

The .htaccess is working fine. When opening http://learnerschool.site/ and http://learnerschool.site/public/ you get the exact same 500 error code, which means the .htaccess file is working as intended.

But for some reason, your website is crashing. But you’ll need to debug that, because it’s the website code, not the .htaccess file, that’s causing this.

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.