所以我在这件事上花了太多时间——有点绝望。
.ht 访问:
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^submit/?$ submit.php [NC,L]
/etc/apache2/sites-available/applicapple:
<VirtualHost *:80>
ServerAdmin support@perpetualcontrast.com
DocumentRoot /var/www/applicapple
ServerName applicapple.localhost
<Directory /var/www/applicapple/>
Options Indexes FollowSymLinks MultiViews
RewriteEngine On
AllowOverride All
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
submit.php 肯定存在。在访问 applicapple.localhost/submit 时:
在目录中使用 submit.php,我得到The requested URL /submit was not found on this server.
如果我删除 submit.php,我会得到The requested URL /submit.php was not found on this server.
如果我访问 localhost/applicapple 它会按预期工作。
有人能告诉我这里发生了什么吗?