Answer the question
In order to leave comments, you need to log in
How to make an entry point to the site?
You need to configure htaccess somehow.
My site opens, not directly blog.loc, but I also need to add public, like this blog.loc/public/ I set everything up using htaccess and set it up on the local host in my openserver so that the root of the site would be exactly the folder /public. Now, when I uploaded it to the hosting, the site is no longer working, how to set it up so that when you enter the site, the root folder is public?
Now I removed the setting in openserver and change htaccess.
fundamentally
RewriteEngine On
RewriteCond %{THE_REQUEST} /public/([^\s?]*) [NC]
RewriteRule ^ %1 [L,NE,R=302]
RewriteRule ^(.*)$ /public/index.php?$1 [L,QSA]
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-l
RewriteRule ^(.*)$ index.php?$1 [L,QSA]
Answer the question
In order to leave comments, you need to log in
RewriteRule !\.(js|ico|gif|jpg|png|css|pdf|mov|mp3|woff2)$ index.php
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question