Home > Backend Development > PHP Tutorial > 搜了N变教程,还是没配置好apache 虚拟目录 伪静态,求大家帮忙看下有关问题出在哪

搜了N变教程,还是没配置好apache 虚拟目录 伪静态,求大家帮忙看下有关问题出在哪

WBOY
Release: 2016-06-13 11:40:00
Original
787 people have browsed it

搜了N变教程,还是没配置好apache 虚拟目录 伪静态,求大家帮忙看下问题出在哪
根据网上搜索的教程来配置apache 虚拟目录伪静态,结果还是无法实现,请大家帮忙找下原因,非常感谢!

第一步:开启伪静态

将httpd.conf中#LoadModule rewrite_module modules/mod_rewrite.so,取消注释

将AllowOverride None全部替换成AllowOverride All



第二步:开启虚拟目录

将httpd.conf中#Include conf/extra/httpd-vhosts.conf,取消注释

并在httpd-vhosts.conf中配置虚拟目录,虚拟目录内容如下


<VirtualHost 127.0.0.2><br />    ServerAdmin [email&#160;protected]<br />    DocumentRoot "F:/phpsite/myweb"<br />    ServerName 127.0.0.2<br />	<Directory "F:/phpsite/myweb"><br />        Options Indexes FollowSymLinks<br />        AllowOverride All<br />        Order allow,deny<br />        Allow from all<br />    </Directory><br /></VirtualHost><br />
Copy after login



第三步:配置.htaccess重写规则

.htaccess文件内容如下


<IfModule mod_rewrite.c><br />        RewriteEngine on<br />        RewriteRule ^/conf_([0-9]*).html /conf.php?arg=$1<br /></IfModule>
Copy after login




第四部:设置conf.php文件内容和重启apache




查了一晚上的资料还是没搞定,好捉急!!!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template