简体   繁体   English

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

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

I have noticed the facebook site showing up url like http://www.facebook.com/?sk=nf what i understand is there must be a index file = index.php which is working based on the GET variable sk to get contents for its functionality . 我注意到Facebook网站显示的网址像http://www.facebook.com/?sk=nf ,据我了解,必须有一个基于GET变量sk来获取内容的索引文件= index.php为其功能。

can anyone help please? 有人可以帮忙吗?

I have tried to add a link in my page href="?sp=admin" on a page noname.php which is in a folder xxxx along with the index.php 我试图在页面noname.php的页面href =“?sp = admin”中的页面上添加链接,该页面与index.php一起位于文件夹xxxx中

xxxx> index.php xxxx> noname.php xxxx> index.php xxxx> noname.php

so when i click on that link it directs to "noname.php?sp=admin" while i want it go to "index.php?sp=admin" 因此,当我单击该链接时,它指向“ noname.php?sp = admin”,而我希望它转到“ index.php?sp = admin”

and my site should show up like this www.xxxx.com/?sp=admin 并且我的网站应该显示为www.xxxx.com/?sp=admin

you will try like this href="/?sp=admin" it will redirect to index page like www.xxxx.com/?sp=admin. 您将尝试使用这种href =“ /?sp = admin”它将重定向到索引页面,例如www.xxxx.com/?sp=admin。 please add slash 请加斜杠

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

please use this mod_rewrite rules in .htaccess file in your xxx folder 请在xxx文件夹中的.htaccess文件中使用此mod_rewrite规则

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

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