简体   繁体   English

哈希(#)的URL重定向问题

[英]URL Redirection issue for hash(#)

I am sending mail using different file. 我正在使用其他文件发送邮件。 My Main URL is something like this http://www.examplehasset.com/enquiry-form.php#quote_page 我的主要网址是这样的http://www.examplehasset.com/enquiry-form.php#quote_page

from this page, i send enquiry. 从此页面,我发送查询。 and after sending mail I wrote header loaction to redirect thank you page. 发送邮件后,我写了标题栏以重定向“谢谢”页面。

header("Location: enquiry-thanks-you-page.php"); exit; so this line is working proper to redirect me on thank you page. 因此,此行正常工作,可以将我重定向到“谢谢”页面。 but one issue is that character after (#) is also appended to my URL. 但是一个问题是(#)之后的字符也被附加到了我的网址之后。 so my thankyou page URL is looks like this. 所以我的谢谢页面URL看起来像这样。 http://www.examplehasset.com/enquiry-thanks-you-page.php#quote_page

I dont want #quote_page in URL. 我不想要URL中的#quote_page So let me know what is the method to do so? 那么,让我知道这样做的方法是什么? I just want the URL as follow. 我只想要如下网址。 http://www.examplehasset.com/enquiry-thanks-you-page.php

尝试仅使用#重定向[解决方法] 。( 查看它是否适用于所有浏览器 )。

header("Location: enquiry-thanks-you-page.php#"); //See if it works

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

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