I Have A shared host and i have made a laravel project and when i upload it to the host i made a htaccess file to redirect all requests to publc/index.php and it works very well and laravel project work good when i create a sub domain and but some files in subdomain's folder and try to access it i got a 500 Internal Server Error
when i contaced the support they told me that this error because the .htaccess
that i made i need help to solve this problem this is the structure of my public_html
folder
-public_html
|-laravelproject
|- Laravel Projct Files
|-subdomain
|-index.php
|-.htaccess
.htaccess file:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} !^laravelproject/public
RewriteRule ^(.*)$ laravelproject/public/$1 [L]
</IfModule>
Since subdomain is other installation i think you should add
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} !^laravelproject/public
RewriteRule ^(.*)$ laravelproject/public/$1 [L]
RewriteCond %{REQUEST_URI} !^subdomain/public
RewriteRule ^(.*)$ subdomain/public/$1 [L]
</IfModule>
But im no .htaccess expert, hope it works!...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.