Apache完全忽略了我的.htaccess文件,无论我在那里写什么它都不会读它。
虚拟主机:/etc/apache2/sites-enabled/example.com
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName example.com
ServerAlias *.example.com
DocumentRoot /var/www/example.com
<Directory /var/www/example.com>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>
htaccess文件:/var/www/example.com/.htaccess
RewriteEngine on
RewriteRule ^hjalp/$ /index.php?page=help
所有与此相关的问题似乎都可以通过启用mod重写或将AllowOverride更改为All而不是None来解决。但这对我没有任何意义,是的,我已经重新加载并重新启动了apache。 (Ubuntu 12.10“Quantal Quetzal”最小x64,Apache / 2.2.22)
我该如何解决这个问题?
编辑: 我从来没有真正发现这背后的问题,但干净的重新安装(再次)解决了这些问题。
答案 0 :(得分:-1)
尝试
RewriteEngine on
RewriteRule ^hjalp/$ index.php?page=help
没有斜线它对我有用