ChinaUnix.net
相关文章推荐:

apache url拦截

我在httpd.conf中: AddModule mod_rewrite.c RewriteEngine on RewriteLog "/usr/local/apache/logs/rewrite.log" RewriteLogLevel 9 RewriteRule component\/option\,(.*) index2\.php\?option=$1 [N,L] 启动apache没有问题, 也有 rewrite.log, 但是空的, 我尝试visit http://192.168.100.2/component/option,test 时, 期望它能rewrite 为 http://192.168.100.2/index2.php?option=test ,但好象rewrite没有生效似的,另外, rewrit...

by leon_yuen - 服务器应用 - 2005-01-29 23:20:19 阅读(972) 回复(4)

相关讨论

安装apache后,发现如访问"http://www.xx.com/aa/"能访问aa目录下的默认文档,如index.htm,但是如果用"http://www.xx.com/aa"则提示找不到页面,请问是不是httpd.conf设置有问题??

by alat - 服务器应用 - 2003-05-27 19:06:46 阅读(1016) 回复(4)

我想将 www.abc.com/profile/about_us.html 转为 www.abc.com/profile.php?page=about_us 我的规则是这样写的: RewriteRule ^profile/([a-zA-Z0-9_]+\.html)$ profile.php?page=$1 结果发现访问www.abc.com/profile/about_us.html的时候,实际访问的是www.abc.com/profile.php?page=about.html, 请问规则中哪里写错了?

by bun - 服务器应用 - 2009-02-04 05:29:18 阅读(1727) 回复(1)

昨天因为研究 mod_rewrite ,找到了这篇文章,觉得写的很好。仔细看了一下,原来是《 apache url Rewriting Guide》的 中文 翻译 ,怪不得,这再次印证了最好的文章就是原文档的观点,呵呵。 原文太长,后半部分似乎还没翻译好,所以光取了前半部分,原文在这里: http://blog.csdn.net/liyonghai/archive/2004/08/23/82319.aspx 英文原文在这里: http://httpd.apache.org/docs/1.3/misc/rewriteguide.html 2004-01-28 21:01:1...

by 剑心通明 - BSD文档中心 - 2008-11-04 09:52:51 阅读(1458) 回复(0)

请教各位,如下要求apache中如何使用mod_rewrite 实现。谢谢! 规则要求是: http://www.abc.com/joy_(1)_(2).html => http://www.bac.com/index.php?parent_id=(1)&joy_code=(2) (1)全是数字 (2) 可以包含字母、数字、横线(-)和下划线(_) [ 本帖最后由 perry001 于 2008-10-30 13:36 编辑 ]

by perry001 - 服务器应用 - 2008-11-18 14:33:58 阅读(1683) 回复(3)

我想在 apache 设置 在IE上输入 123.edgora.com 可以访问 http://www.edgora.com/edgora/new/index_main.php?swfCode=logonCode%253D0%2526appCode%253D0%2526subAppCode%253D0%7CgrouId%253D555 请问 该怎么写? 我写的 ServerName 123.edgora.com RewriteEngine ON RewriteRule ^/$ http://www.edgora.com/edgora/new/index_main.php?swfCode=logonCode%253D0%2526appCode%253D0%2526subAppCode%253D0%7Cg...

by yangzludy - 服务器应用 - 2008-08-05 10:59:06 阅读(1477) 回复(0)

RT.. 代码如下 RewriteRule ^/([^\.]+)\.html\?(.*)$ /watch.php?a=$1&$2 想使用上面正则达到如下效果: /sss.html?c=1 改写为 /watch.php?a=sss1&$c=1 但测试发现不行,初步怀疑是 \? 转义?的问题,但不知如何解决? 谢谢.

by Qlin - PHP - 2008-06-23 10:56:49 阅读(1357) 回复(0)

我想实现如下功能: 1、一台1个独立IP(1.2.3.4)的apache Server; 2、将域名 *.abc.com, *.cde.com 的泛解析都解析到服务器的IP 1.2.3.4; 3、用户浏览x.abc.com、x.cde.com都将自动跳转到 www.xyz.com 初步测试了一下,没有达到预定效果,请有经验的兄台指点一下。

by NetSec - 服务器应用 - 2006-06-20 17:24:04 阅读(1067) 回复(0)

因我要做一个国外的网点的mirror, 其环境是apache+php+mysql+ssl, 手上有了所有的page,但只是首页能正常外,其他都不能运行, 因在首页中的所有的link都是些很奇异的url, 如: https://www.xxx.com/component/option,com_phpshop/page,shop.browse/category_id,fd03cb28232a97bb677f7690125a0a61/option,com_phpshop/Itemid,/ 看起source code中, 只有component这个目录,但在component下没有option. 有那位高手能帮忙指点一下这u...

by leon_yuen - 服务器应用 - 2005-01-31 14:17:41 阅读(1099) 回复(4)

因我要做一个国外的网点的mirror, 其环境是apache+php+mysql+ssl, 手上有了所有的page,但只是首页能正常外,其他都不能运行, 因在首页中的所有的link都是些很奇异的url, 如: https://www.xxx.com/component/option,com_phpshop/page,shop.browse/category_id,fd03cb28232a97bb677f7690125a0a61/option,com_phpshop/Itemid,/ 看起source code中, 只有component这个目录,但在component下没有option. 有那位高手能帮忙指点一下这u...

by leon_yuen - 服务器应用 - 2005-01-26 08:20:14 阅读(750) 回复(0)

1. RewriteRule ^archiver/((fid|tid)-[0-9]+\.html)$ archiver/index.php?$1 2. RewriteRule ^(.*)/archiver/((fid|tid)-[0-9]+\.html)$ $1/archiver/index.php?$2 这2句话有什么区别。应用情况有什么不同吗?

by ccc77 - 服务器应用 - 2009-06-09 15:10:26 阅读(1235) 回复(2)