【发布时间】:2011-09-24 23:37:53
【问题描述】:
1) 我得到了 mysite.com/about-me.php。
当我输入 mysite.com/About-me.php 时,我收到 404 错误。
我想为我的 .htaccess 添加一些魔法,以便 mysite.com/My-PaGe.php (etc) redirects the user by 301, OR rewrites the URL (whatever is the best?) to mysite.com/my-page.php.
- 是301还是重写最好?
2) 我是否可以添加一条适用于所有 URL 的规则,还是我必须手动指定所有不同的页面?
奖励 3) 如果有人知道如何将 mysite.com/mY-paGe.php 重写为 mysite.com/my-site,则额外奖励星星
非常感谢
【问题讨论】:
标签: .htaccess url-rewriting http-status-code-301 friendly-url