PHP url重写空链接
我正在尝试重新连接网址,没关系,但所有带有 href“#”的链接都会转到一个页面。
这是我的网址重写;
RewriteEngine on
ReWriteRule ^index$ index.php [L,NC]
ReWriteRule ^groups/(.*) groupdetail.php?groupid=$1
这是一个普通的链接,指向login.php,所有网址都指向login.php
<a href="#">Settings</a>
i'm trying to rewirting urls, it's ok but all links with href "#" goes to a page.
here is my url rewriting;
RewriteEngine on
ReWriteRule ^index$ index.php [L,NC]
ReWriteRule ^groups/(.*) groupdetail.php?groupid=$1
and this is an ordinary link which goes to login.php, all urls go to login.php
<a href="#">Settings</a>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
#
。这就是我非常讨厌
的原因之一。如果可能的话,请考虑使用绝对 URL 来寻址样式表:The
<base>
tag is your problem: It is rewriting all your relative links on the page, including#
.This is one reason why I hate
<base>
with a passion. If at all possible, consider using absolute URLs to address your style sheets instead: