index.php不应该像facebook一样出现在url上?

index.php不应该像facebook一样出现在url上?,php,Php,我注意到facebook网站显示的url像 据我所知,必须有一个index file=index.php,它基于GET变量sk来获取其功能的内容 有人能帮忙吗 我已尝试在我的页面href=“?sp=admin”中添加一个链接,该链接位于文件夹xxxx中的noname.php和index.php中 xxxx>index.php xxxx>noname.php 因此,当我单击该链接时,它会指向“noname.php?sp=admin”,而我希望它转到 “index.php?sp=admin” 我的网

我注意到facebook网站显示的url像 据我所知,必须有一个index file=index.php,它基于GET变量sk来获取其功能的内容

有人能帮忙吗

我已尝试在我的页面href=“?sp=admin”中添加一个链接,该链接位于文件夹xxxx中的noname.php和index.php中

xxxx>index.php xxxx>noname.php

因此,当我单击该链接时,它会指向“noname.php?sp=admin”,而我希望它转到 “index.php?sp=admin”


我的网站应该显示如下:www.xxxx.com/?sp=admin

您可以这样尝试href=“/?sp=admin”它将重定向到像www.xxxx.com/?sp=admin这样的索引页。请加斜杠

RewriteEngine On
DirectoryIndex index.php
AddDefaultCharset On
Options +FollowSymLinks -Indexes
RewriteRule ^index.php /noname.php [L]

请在xxx文件夹的.htaccess文件中使用此mod_重写规则

如果使用apache webserver,则关键字为
mod_rewrite
。请在xxx文件夹的.htaccess文件中使用此mod_重写规则