Simple mod rewrite with PHP Get values
谁能告诉我我到底做错了什么?
试图采取:
1
|
并制作:
1
|
/23/testing.html
|
用这个:
1
|
对于我的生活,我无法解决这个问题……或者如果有更好的方法,请指出正确的方向。
** 更新
好的,在放弃这个之后,我终于联系了托管公司,看看我的域是否有问题导致它无法正常工作。这是他们告诉我的:
You do not have a rewrite condition and you only have a simple rewrite. For the code to >always work properly you should normally set a”RewriteCond” with a valid pattern.
You have used the”?” question mark character in your code although this is an escape >character and doing so would only cause a rewrite to index.php based upon your code as >everything after the question mark gets escaped.
Please consider using a”RewriteCond” in your code and also use regexes to properly escape >the”?” character and avoid unexpected behavior.
谁能帮帮我?谢谢!
- 确保将 R 放入参数 [L,R] 中。我通常构建一个快速的自定义 MVC 并让每个请求都通过 index.php。这样我就可以编写出我的永久链接。
- 仍然没有骰子。我不需要对我的 PHP 文件做任何其他事情吗?我可以得到一个简单的 hmtl 重定向来工作,所以我知道路径等正在工作……但对于我的生活,我无法弄清楚为什么这不起作用..
- 我相信重写规则应该以 ^/ 开头。
1
|
来源:https://www.codenong.com/13671955/