By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,962 Members | 1,998 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,962 IT Pros & Developers. It's quick & easy.

display domain name instead of filename in php

P: 57
How do I display main domain name instead of ip or filename in php? For example suppose I am redirected to file http://example.com/myfolder/test.htm, then instead of specified url I want to display example.com in the address bar for such url. How can it be done?
Mar 21 '12 #1
Share this Question
Share on Google+
6 Replies


P: 78
Use ajax function. Then it will be in that same page.
Mar 21 '12 #2

P: 57
kindly tell me how to do that
Mar 22 '12 #3

P: 78
if you are having a menu in your example.com page, on click event just call ajax function then page will nor refresh and not redirect to requested page instead of that calling page(requested page ) will include in example.com page itself so in url we cannot see the path.
you can use ajax function in any event on mouseover or on click or anthywhere
--Ammu
Mar 24 '12 #4

helimeef
P: 77
You could use an <iframe>, and load a specific page into it using Javascript.
You can't, however, simply change the contents of the browser address bar. It will always show the address of the page it's displaying.
Mar 25 '12 #5

100+
P: 1,059
use mod rewrite, it will save your time
Apr 4 '12 #6

ditditsasa
P: 17
simple format is to give the url as form action="example.com/myfolder/test.htm"
Apr 4 '12 #7

Post your reply

Sign in to post your reply or Sign up for a free account.