如何将我的域名的扩展名从cars.net 更改为cars.com? [英] how to change the extention of my domain name from cars.net to cars.com?

查看:27
本文介绍了如何将我的域名的扩展名从cars.net 更改为cars.com?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  • 我有这个域名 (cars.net),我想在 index.php 显示其内容后将其更改为 (cars.com).

  • I have this domain name (cars.net), and i want to change it to (cars.com) just after the index.php display its content.

我不希望在我的域名更改其扩展名后页面更改其数据,我只想在加载 index.php 后更改我的域名的扩展名,而无需任何刷新或重定向或更改其数据.

I don't want that the page changes its data after my domain name will change its extention, i want only change the extention of my domain name after the loading of the index.php without any refresh or redirect or change in its data.

有没有办法用 jquery 或 javascript 代码做到这一点?我使用了这段代码,但它重定向了页面及其内容,我不想要那样,所以有什么帮助吗?

is there any way to do that with jquery or javascript code ? I used this code but it redirects the page and its content and i don't want that, so any help to do that?

<script> 
 windows.location.replace("https://cars.com");
</script>

推荐答案

没有

History API 可以操作网页的网址.

The History API can manipulate the path component of the page's URL.

如果不导航到新的原点,就无法更改原点.

Nothing can change the origin without navigating to the new origin.

如果人们能够对访问者正在查看的域撒谎,这对进行网络钓鱼攻击的人来说将是一个巨大的福音.

It would be a huge boon to people making phishing attacks if they could lie about the domain the visitor was looking at.

这篇关于如何将我的域名的扩展名从cars.net 更改为cars.com?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆