URL重写DomainName.com [英] URL rewrite for DomainName.com
本文介绍了URL重写DomainName.com的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在重写网址www.DomainName.com/x.如果有用户输入
I am doing a rewrite for url www.DomainName.com/x. If any user types in
- DomainName.com/x或
- DomainName.com/x/
它必须转到exit.php,其中"x"可以是任何东西.
it must go to exit.php, where "x" can be anything.
我的代码是
RewriteEngine on
RewriteRule /$ exit.php
RwriteRule $ exit.php
如何编写重写代码以使其进入exit.php,并且在键入DomainName.com时应将其转到DomainName.com而不是exit.php
How do I write the rewrite code for it to go to exit.php and when DomainName.com is typed it should go to DomainName.com not exit.php
谢谢 吉恩
推荐答案
RewriteEngine on
RewriteRule ^(|start\.php)$ start.php [L] #Contains the filename you want to redirect when calling www.domain.tld/
RewriteRule .+ exit.php [L]
这篇关于URL重写DomainName.com的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文