所以我花了太多时间在这个 - 有点绝望。mod_rewrite不能与子域
的.htaccess:
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^submit/?$ submit.php [NC,L]
的/ etc/apache2的/网站可用/ applicapple:
<VirtualHost *:80>
ServerAdmin [email protected]
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.php在目录中,我得到The requested URL /submit was not found on this server.
如果我删除submit.php,我得到The requested URL /submit.php was not found on this server.
如果我访问本地主机/ applicapple它按预期工作。
有人能告诉我这里发生了什么吗?
如果您尝试使用sub.localhost/submit /而不是sub.localhost/submit,该怎么办? – 2012-12-17 14:25:25
效果相同,输出没有区别): –