English 中文(简体)
防止双向接触
原标题:Preventing a double redirect with htaccess

I m trying to create a redirect in-between page of sorts, because the URL that I m redirecting TO includes more information than the URL I m redirecting FROM. I m using a short domain (hrci.me) with an htaccess file to redirect to the full domain (currently reachchallenges.infectionist.com). An example would be:

hrci.me/ch123

第3123条道路包括识别符号,让我知道它是一个挑战环节(ch),123条是挑战。 每一项挑战都有一份标题,我要为地球观测组织的目的在结束欧洲空间法中心。 例如,URL将转向:

达到目标

“Challenge+Title”部分储存在数据库中,需要用 challenge击取,因此我只写了一种简单的PHP文字,然后处理转头。 我的准入规则就是这样:

RewriteRule ^ch([0-9]{1,4})(/)?$ redirhandler.php?chid=$1 [L]

因此,申请/ch123应当转而到Dreirhandler.php?chid=123,然后在文件/challenge/123/Challenge+Title上将标题转至其他领域。 问题在于,为把所有即将收到的申请转交长期,维持原有道路(Shrci.me/somethingss redirect totochallenges.infectionist.com/something),而I m 认为,在离去后,旋转处理rew器,再到红手里。

从根本上说,如果道路是红色双手,则我需要忽视任何进一步的再方向,使营地的文字能够处理其余的斜线。 我认为,“礼仪”是我可以做的,但我可以说出。

问题回答

如同你的规则一样,即将提出的长期请求比要求/要求更具体的规则要高。 要求将更具体的规则摆在更一般性的规则之前。





相关问题
Using SimplePie with CodeIgniter and XAMPP

I am using CodeIgniter 1.7.2 with XAMPP 1.7.2 on a Windows computer. I am trying to make use of SimplePie. I followed all the instructions I could find: a copy of simplepie.inc is in my applications/...

Multiple Sites with common files

I have developed over 50 sites that all use the exact same files other than CSS and IMAGES, I currently duplicate the files each time I create a new site and upload different css and images. What ...

http server validation

I finish a litle http server, writing from scratch. I would like to be sure that my imlementation is conforme to the HTTP specifications. W3C give us tools for HTML/XML conformance, but i see nothing ...

热门标签