繁体   English   中英

index.php应该不会像facebook一样显示在网址上?

[英]index.php should not show up on the url like facebook?

我注意到Facebook网站显示的网址像http://www.facebook.com/?sk=nf ,据我了解,必须有一个基于GET变量sk来获取内容的索引文件= index.php为其功能。

有人可以帮忙吗?

我试图在页面noname.php的页面href =“?sp = admin”中的页面上添加链接,该页面与index.php一起位于文件夹xxxx中

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_rewrite规则

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM