【发布时间】:2009-12-17 17:10:31
【问题描述】:
我想要打字的用户
http://www.example.com/word-of-the-day
被带到
http://www.example.com/index.php?page=word-of-the-day
但我想要
http://www.example.com/word-of-the-day
显示在用户的 URL 中。
我应该在我的 .htaccess 中做什么?我试过了,但是正则表达式 而且 RewriteRule 的语法对我来说太复杂了 弄清楚怎么做。
我们将不胜感激。
编辑:
另外,我怎么能在 htaccess 中这么说 -
如果他们输入http://www.example.com/word-of-the-day,请将他们带到http://www.example.com/index.php?page=word-of-the-day
或者如果他们输入http://www.example.com/something-else,将他们带到http://www.example.com/index.php?page=something-else
否则,只需将他们带到他们输入的 URL。
【问题讨论】:
标签: .htaccess url-rewriting mod-rewrite