【发布时间】:2013-03-27 17:01:29
【问题描述】:
我想为
写一个重写规则http://www.site.com/noticia/?_escaped_fragment_=noticia=/279/beto-cuevas3er-sencillo-dej-de-pensar
到:
http://www.site.com/noticia/#!noticia=/279/beto-cuevas3er-sencillo-dej-de-pensar
我已经尝试过了,但离我需要的还很远,对吧?
# Enable Rewrite Engine
RewriteEngine on
#Create friendly URL
RewriteRule ^index.php?_escaped_fragment=something=yes$
index.php/#!something=yes [L]
【问题讨论】:
-
AFAIK 你不能在其中重写#。它只是客户端。
-
这似乎不是实现#! 的好方法。您试图使丑陋的版本返回与友好版本完全相同的内容。这违背了整个练习的要点,即丑陋的将返回内容的纯文本。