我正在使用 XAMPP 在本地主机上运行 nette 框架。当我转到索引页面时,一切都很好,但是当我单击某些子页面的 URL 时,我收到 404 错误。
我在我的文档文件夹中设置了 apache (httpd-vhosts.conf) 别名:
Alias /documents "C:/Users/username/Documents"
<Directory "C:/Users/username/Documents">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
当我使用 URL http://localhost/documents/git/projectXY/www/进入索引页面时,一切正常
但是当我单击带有 URL http://localhost/documents/git/projectXY/www/customer/sign/in的 Sing in 按钮时,我收到 404 错误
在 www 文件夹中我有 htaccess:
# Apache configuration file (see httpd.apache.org/docs/current/mod/quickreference.html)
# disable directory listing
<IfModule mod_autoindex.c>
Options -Indexes
</IfModule>
# enable cool URL
<IfModule mod_rewrite.c>
RewriteEngine On
# RewriteBase /
# prevents files starting with dot to be viewed by browser
RewriteRule /\.|^\. - [F]
# front controller
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !\.(pdf|js|ico|gif|jpg|png|css|rar|zip|tar\.gz|map)$ index.php [L]
</IfModule>
# enable gzip compression
<IfModule mod_deflate.c>
<IfModule mod_filter.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript application/json application/xml image/svg+xml
</IfModule>
</IfModule>
知道我在做什么错吗?