Answer the question
In order to leave comments, you need to log in
The standard routing on index.php does not want to work. What is the reason?
There is a web folder. There are two files in the folder:
index.php which contains all subsequent routings and .htaccess .htaccess
content:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
When requesting "/web/" everything is ok. Index.php is displayed
When requesting "/web/*" i.e. anything after web/ get 404 i.e. it feels like .htaccess doesn't want to process and redirect to index.php.
Answer the question
In order to leave comments, you need to log in
if this is not the root of the site, but you need to redirect to /web/index.php
and you have Apache trying to find
upd in the root of the site. solution to the issue
apachectl -M (check if there are rewrite_module in the modules)
sudo a2enmod rewrite - enable the module
sudo systemctl restart apache2 - restart Apache
in the /etc/apache2/apache.conf file
, the line AllowOverride All is important
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question