当前位置: 技术问答>linux和unix
[急!!!]关于apache服务器url转发的问题
来源: 互联网 发布时间:2015-12-17
本文导语: 我用apache2.05,配置文件httpd.conf中有如下内容: …… LoadModule rewrite_module modules/mod_rewrite.so …… AddDefaultCharset GB2312 ServerAdmin webmaster@ceshi.com.cn ServerName www.ceshi.com.cn DirectoryIndex index.htm index.html index.jsp ...
我用apache2.05,配置文件httpd.conf中有如下内容:
……
LoadModule rewrite_module modules/mod_rewrite.so
……
AddDefaultCharset GB2312
ServerAdmin webmaster@ceshi.com.cn
ServerName www.ceshi.com.cn
DirectoryIndex index.htm index.html index.jsp
ErrorLog logs/www.ceshi.com.cn-error_log
CustomLog logs/www.ceshi.com.cn-access_log common
RewriteEngine on
RewriteLog logs/rewrite.log
RewriteRule ^/$ http://www.qq.com
……
启动没有报错,也就是说有mod_rewrite.so文件。
现在的效果是可以跳转但就不能实现隐藏。
按资料上说的最后一行
RewriteRule ^/$ http://www.qq.com [R]
可以有一个[R]的参数,有[R]他叫外部的也就是可见的,没有[R]叫内部的也就是不可见即隐藏的,可我设过了带不带[R]都是可见的,还请高人指点
……
LoadModule rewrite_module modules/mod_rewrite.so
……
AddDefaultCharset GB2312
ServerAdmin webmaster@ceshi.com.cn
ServerName www.ceshi.com.cn
DirectoryIndex index.htm index.html index.jsp
ErrorLog logs/www.ceshi.com.cn-error_log
CustomLog logs/www.ceshi.com.cn-access_log common
RewriteEngine on
RewriteLog logs/rewrite.log
RewriteRule ^/$ http://www.qq.com
……
启动没有报错,也就是说有mod_rewrite.so文件。
现在的效果是可以跳转但就不能实现隐藏。
按资料上说的最后一行
RewriteRule ^/$ http://www.qq.com [R]
可以有一个[R]的参数,有[R]他叫外部的也就是可见的,没有[R]叫内部的也就是不可见即隐藏的,可我设过了带不带[R]都是可见的,还请高人指点
|
用[P]
|
使用[P]需加载proxy模块
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。