Answer the question
In order to leave comments, you need to log in
.htaccess without index.php
There was a task to redirect all requests from the root directory to a subdirectory. I put in the
root with the content:/www/example.com
.htaccess
Options +FollowSymLinks -MultiViews -Indexes
RewriteEngine on
RewriteRule . app/index.php [QSA]
/www/example.com/app/index.php
. /www/example.com
an empty index.php, otherwise an errorAH01276: No matching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive
or if we remove -Indexes
, thenAH01630: client denied by server configuration: /www/example.com/.htaccess
<Directory "%hostdir%">
AllowOverride all
Require all granted
</Directory>
But this is a regular virtual hosting, there is no access to httpd-vhost. Answer the question
In order to leave comments, you need to log in
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ public/ [L]
RewriteRule (.*) public/$1 [L]
</IfModule>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question