header('location:index.php');
重定向到www.website.com/index.php
我想重定向到www.website.com/
所以使用
header('location:');
但这不起作用
答案 0 :(得分:0)
您可能想要使用mod_rewrite
类似于你的.htaccess应该可以做到这一点
RewriteRule ^a$ about.php
或
RewriteRule ^a$ about.php&%{QUERY_STRING}
如果你想保留参数。
我也不认为你想说www.web.com/about .com
答案 1 :(得分:0)
您可以将此代码用于.htaccess,并使用www.web.com/about
链接Options +FollowSymLinks
RewriteEngine on
## handler view
RewriteRule ^about$ about.php [L]