Ok, i will start from beginning with fresh files
My laravel project (subdomain <- its name folder) is in root folder. i took content from "public" folder and move to public_html/subdomain
public_html/subdomain/index.php
require __DIR__.'/vendor/autoload.php';
$app = require_once __DIR__.'/bootstrap/app.php';
i changed to:
require __DIR__.'/../../subdomain/vendor/autoload.php';
$app = require_once __DIR__.'/../../subdomain/bootstrap/app.php';
next what i changed is: root/subdomain/server.php
if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {
return false;
}
require_once __DIR__.'/public/index.php';
To:
if ($uri !== '/' && file_exists(__DIR__.'/../public_html/subdomain'.$uri)) {
return false;
}
require_once __DIR__.'/../public_html/subdomain/index.php';
.htaccess from public_html/subdomain
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Send Requests To Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
aaand 500