Published 3 months ago by dohisev
As I'm in a shared hosting and I can't create a apache virtual host to point to the public folder I tried to use the solution of creating a
.htaccess on the root folder to point to the public but it doesn't work, I'm getting an error:
Sorry, the page you are looking for could not be found.:
<IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^(.*)$ public/ [L] </IfModule>
How can I solve this?
I also trying to get all the files from the public to the root folder but the css and js files are not loading properly using
Just a question, you want me to put this on the
/public_html/.htaccess? If yes, I can't cause I'm not allowed to change the root
.htaccess as there are other projects running in other folders and there are rules in that
.htaccess I sent you was located inside
/public_html/panel/.htaccess that would point to
Hmm, well then I think you are going to have a tough time trying to figure that one out. The only suggestion I would have is to place the Laravel site in a subdomain and link it via the root htaccess. That will allow all sites to run. You can even rewrite the url so no one notices.
can you not create files at the same level as public_html ?
the methods discussed here are dangerous and put you at risk of having your .env file downloaded
if you can create files at the root level, copy all your framework there and copy
public folder contents into