Это структура моих каталогов: < /p>
Код: Выделить всё
.
└── home/
├── .env
├── composer.json
├── public_html/
│ ├── .htaccess
│ └── public/
│ ├── .htaccess
│ ├── config/
│ │ ├── middleware.php
│ │ ├── routes.php
│ │ └── services.php
│ ├── index.php
│ ├── src
│ └── views
└── vendor
< /code>
В [b]public_html
Код: Выделить всё
# BEGIN WordPress
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
< /code>
В [b]public
В
Код: Выделить всё
public/.htaccess
Код: Выделить всё
Options -Indexes
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [NC,L,R]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [NC,QSA,L]
Это, если я напишу:
Код: Выделить всё
https://www.example.com/public/products/index
Код: Выделить всё
https://www.example.com/products/index
Подробнее здесь: https://stackoverflow.com/questions/796 ... me-website