【发布时间】:2013-09-22 17:08:52
【问题描述】:
在这里,我遇到了重写 url 的问题。我正在使用带有 xampp 的 php(5.0 以上版本)。
我当前的网址是
原始网址:/localhost/test/signup.php
重定向网址:/localhost/test/signup/
我在 htdocs 中写了重写规则
RewriteEngine On
RewriteBase /test/
RewriteRule ^signup/$ signup.php
它不工作。我也更改了 httpd.conf 设置。但没用。
【问题讨论】:
-
所以你想从 url 中删除 .php ?
-
那样,但在某些时候 url 是 signup.php?id=4 然后它会显示我们 signup.php/4/。
-
你也可以显示像 signup/4/ :)
-
谢谢你,我认为它的工作......
标签: php apache .htaccess url-rewriting url-rewrite-module