我的 apache2 有问题,url 重写不起作用,我不知道为什么......
在我的 phpinfo() 中,我有:
Loaded Modules: mod_rewrite
我的.htaccess:
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^test\.html$ /test.php [L]
我的 Apache 配置:
<VirtualHost>
ServerAdmin mail@gmail.com
ServerName www.site.com
ServerAlias site.com
DocumentRoot /var/www/site.com/
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/site.com/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride All
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
我认为我的配置是正确的,但我真的不知道为什么我的重写不起作用......你有什么想法吗?
非常感谢 !