【发布时间】:2014-03-25 15:56:21
【问题描述】:
我正在尝试在服务器上启用 mod_rewrite。我的网站位于文件夹 /data/web/new-domovreality.sk/web 中。该文件夹中有.htacces 和 index.php 文件。
我现在的
etc/apache2/sites-available/default
<VirtualHost *:80>
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
<Directory /data/web/>
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 ${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
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>
我已阅读我认为启用它的所有说明,但我无法做到。有人能帮我吗?我是第一次这样做。谢谢
当我使用 phpinfo() 时,启用了 mod_rewrite。
【问题讨论】:
标签: .htaccess mod-rewrite apache2