Home  >  Article  >  Backend Development  >  请教一个apache Rewrite匹配规则

请教一个apache Rewrite匹配规则

WBOY
WBOYOriginal
2016-06-23 14:25:01760browse

我想把首页 xxx.abc.com 自动跳转到xxx.abc.com/home.php,请问该如何写匹配规则?
要做到 xxx.abc.com/*.php---即带有后缀的url都要保证不变
rewriteEngine on
RewriteCond **********
RewriteRule ****************** [L]

非常感谢! 


回复讨论(解决方案)

这个可以不用重写。
检查url,如果是xxx.abc.com ,直接用header函数跳转到xxx.abc.com/home.php。

或者使用 Apache的DirectoryIndex

Statement:
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