[英]Redirect to homepage without changing address bar URL
I am trying to redirect people that enter the URL domain.com/project/206/9
to domain.com
but the URL domain.com/project/206/9
should be displayed. 我正在尝试将输入URL domain.com/project/206/9
人重定向到domain.com
但是应该显示URL domain.com/project/206/9
。 Then I want to extract the numbers 206
and 9
from my URL and use that in my code. 然后,我想从URL中提取数字206
和9
,并在我的代码中使用它们。
I am using a Wordpress website. 我正在使用Wordpress网站。
Try this. 尝试这个。
Write below code in your htaccess file 在您的htaccess文件中编写以下代码
Redirect domain.com/project/206/9 domain.com
It may help you. 它可能会帮助您。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.