我在运行 apache 2.4 的 Centos 6.5 上有以下虚拟主机配置。
<VirtualHost *:4323>
ServerName www.first.com
ServerAlias first.com
DocumentRoot /var/www/first.com
DirectoryIndex index.html
RewriteEngine on
RewriteRule ^index\.html$ index.php$1 [L,R=301]
ErrorLog /var/www/first.com/log/error.log
CustomLog /var/www/first.com/log/requests.log combined
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
当我转到server_IP:4323默认的 HTTP 页面时。我怎样才能让重定向index.php工作?
该httpd.conf配置是这里
下面的 apache 详细信息 -
Server version: Apache/2.2.15 (Unix)
Server built: Mar 22 2016 19:03:53
Server's Module Magic Number: 20051115:25
Server loaded: APR 1.3.9, APR-Util 1.3.9
Compiled using: APR 1.3.9, APR-Util 1.3.9
Architecture: 64-bit
Server MPM: Prefork
threaded: no
forked: yes …Run Code Online (Sandbox Code Playgroud)