php - Why does the url not change upon redirection in php?
问题描述
I have a website based on PHP (with MySQL, Javascript, and JQuery)
Its URL remains unchanged even after the redirection to a new page. This happens for all redirections. If I open the link in a new tab, it will work fine and display the entire new URL but not on the same page. I do not get this issue on localhost, only on the server. What should I do to prevent that?
eg. mywebsite.com redirection to page1 should look like: mywebsite.com/page1 but it doesn't change at all.
The redirection methods that I use is either:
header("Location: ../index.php?Login=error3");
or
<a href="Forms/LogIn.php" class="btn btn-primary">Button</a>
Both redirection types do not change the URL.
解决方案
推荐阅读
- php - 如何将“dmY - dmY”字符串重新格式化为“Ymd Ymd”?
- google-colaboratory - TypeError:“NoneType”对象不可下标 Face_recognition Open CV
- java - Java - 如何将组件水平居中并垂直堆叠?
- python - 如何让 Discord 机器人(使用 discord.py)测试 dms 中的响应?
- vue.js - eslint-plugin-vue vue/valid-v-model 似乎使用 Vue.js 2 中的规则发出警告
- postgresql - 获取 PGSQL 错误“错误:在“位置”或附近出现语法错误”
- keras - 如何优先考虑少数神经网络输入?
- html - Vuetify 从 API 合并分离的图像 url
- c# - 如何使用 Azure 媒体服务生成 Sprite 缩略图
- pytorch - 提高 Huggingface 标记器输出的速度