开发者

change site url using php or javascript?

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-dev开发者_JAVA技巧elopment/URL-masking.php then it must be displayed http://www.willmaster.com/username in url and work as above url...


This won't be done by PHP or Javascript.

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

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


what you are looking for is called: url-rewriting.

Have a look around (here for instance)


URL rewriting / redirection will not allow two or more different pages to appear at the same URL. Use a full screen frame to mask the URL.


make sure that your url that accesses the first page it the url that you want to always display.

using javascript handle all the clicks and get data only through ajax.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜