使用php或javascript更改网站网址? [英] change site url using php or javascript?

查看:61
本文介绍了使用php或javascript更改网站网址?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想更改我的网站网址..
i想要创建新的网址www.mysite.com/username这将显示在地址栏中..即使您点击我网站的任何链接或按钮然后它会在整个网站上显示相同的网址..
ex ..

i want to change my site url.. i want to create new url with www.mysite.com/username this will be displayed in address bar.. even if you are click any link or button of my site then it will be displayed same url throughout site.. ex..

http://www.willmaster.com/library/web-development/URL-masking.php
然后必须显示
在网址中 http://www.willmaster.com/username 并按上述方式工作。 ..

http://www.willmaster.com/library/web-development/URL-masking.php then it must be displayed http://www.willmaster.com/username in url and work as above url...

推荐答案

这不是由PHP或Javascript完成的。​​

This won't be done by PHP or Javascript.

它是通过.htaccess文件中的mod重写完成的。有关详细信息,请参阅链接:

It is done via mod rewrite in the .htaccess file. See the links for more info:

http://edrackham.com/apache/beginners-mod_rewrite-tutorial/

这篇关于使用php或javascript更改网站网址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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